gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 26/189: try to fix sharding issues


From: gnunet
Subject: [taler-grid5k] 26/189: try to fix sharding issues
Date: Thu, 28 Apr 2022 10:46:36 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 8255f22af047712d5b30e62df31cf0cc84e84af9
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Feb 23 15:49:25 2022 +0100

    try to fix sharding issues
---
 experiment/scripts/exchange.sh    |  5 +++++
 sql/exchange-0001.sql             |  2 +-
 sql/exchange-shard-0000.sql       |  1 +
 sql/exchange_plugin_postgres.diff | 14 ++++++++++++++
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/experiment/scripts/exchange.sh b/experiment/scripts/exchange.sh
index 1bf5035..bbb1202 100755
--- a/experiment/scripts/exchange.sh
+++ b/experiment/scripts/exchange.sh
@@ -61,6 +61,11 @@ function setup_exchange() {
 # Initialize all stuff needed 
 # logs, configs, exchanges
 function init_exchanges() {
+
+  cd ~/taler/exchange
+  git apply ${G5K_HOME}/sql/exchange_plugin_postgres.diff
+  make clean uninstall && make -j 10 && make install && ldconfig
+
   restart_rsyslog
 
   setup_config
diff --git a/sql/exchange-0001.sql b/sql/exchange-0001.sql
index d13fc56..441df3a 100644
--- a/sql/exchange-0001.sql
+++ b/sql/exchange-0001.sql
@@ -1131,7 +1131,7 @@ INSERT INTO wire_targets
   VALUES
   (in_h_payto
   ,in_receiver_wire_account)
-ON CONFLICT (h_payto) DO NOTHING
+ON CONFLICT DO NOTHING
   RETURNING wire_target_serial_id INTO wtsi;
 
 IF NOT FOUND
diff --git a/sql/exchange-shard-0000.sql b/sql/exchange-shard-0000.sql
index dfbca38..5f16d62 100644
--- a/sql/exchange-shard-0000.sql
+++ b/sql/exchange-shard-0000.sql
@@ -89,6 +89,7 @@ BEGIN
       '(melt_serial_id BIGINT UNIQUE '
       ',rc BYTEA PRIMARY KEY CHECK (LENGTH(rc)=64) '
       ',old_coin_pub BYTEA NOT NULL '
+      ',h_age_commitment BYTEA CHECK(LENGTH(h_age_commitment)=32) '
       ',old_coin_sig BYTEA NOT NULL CHECK(LENGTH(old_coin_sig)=64) '
       ',amount_with_fee_val INT8 NOT NULL '
       ',amount_with_fee_frac INT4 NOT NULL '
diff --git a/sql/exchange_plugin_postgres.diff 
b/sql/exchange_plugin_postgres.diff
new file mode 100644
index 0000000..fa8c978
--- /dev/null
+++ b/sql/exchange_plugin_postgres.diff
@@ -0,0 +1,14 @@
+diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
+index b5bf71e5..324e2168 100644
+--- a/src/exchangedb/plugin_exchangedb_postgres.c
++++ b/src/exchangedb/plugin_exchangedb_postgres.c
+@@ -796,7 +796,7 @@ prepare_statements (struct PostgresClosure *pg)
+       "    ,coin_val"
+       "    ,coin_frac"
+       "  FROM dd"
+-      "  ON CONFLICT (coin_pub) DO NOTHING"
++      "  ON CONFLICT DO NOTHING"
+       "  RETURNING "
+       "     known_coin_id"
+       "  ) "
+

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]