[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: locking for known_c
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: locking for known_coins |
Date: |
Mon, 26 Aug 2019 03:09:43 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 613217be locking for known_coins
613217be is described below
commit 613217be0354a02611f5e1a34e07989e2c5d5cfe
Author: Florian Dold <address@hidden>
AuthorDate: Mon Aug 26 03:09:38 2019 +0200
locking for known_coins
---
src/exchangedb/plugin_exchangedb_postgres.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c
b/src/exchangedb/plugin_exchangedb_postgres.c
index 75d124ce..54f18da9 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -849,6 +849,12 @@ postgres_prepare (PGconn *db_conn)
" WHERE coin_pub=$1"
" FOR UPDATE;",
1),
+ /* Lock deposit table; NOTE: we may want to eventually shard the
+ deposit table to avoid this lock being the main point of
+ contention limiting transaction performance. */
+ GNUNET_PQ_make_prepare ("lock_known_coins",
+ "LOCK TABLE known_coins;",
+ 0),
/* Used in #postgres_insert_known_coin() to store
the denomination public key and signature for
a coin known to the exchange. */
@@ -3462,6 +3468,14 @@ postgres_ensure_coin_known (void *cls,
struct PostgresClosure *pc = cls;
enum GNUNET_DB_QueryStatus qs;
struct TALER_CoinPublicInfo known_coin;
+ struct GNUNET_PQ_QueryParam no_params[] = {
+ GNUNET_PQ_query_param_end
+ };
+
+ if (0 > (qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
+ "lock_known_coins",
+ no_params)))
+ return qs;
/* check if the coin is already known */
qs = postgres_get_known_coin (pc,
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: locking for known_coins,
gnunet <=