gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: allow double-rollback, warn on r


From: gnunet
Subject: [taler-exchange] branch master updated: allow double-rollback, warn on rollback+commit
Date: Tue, 07 Jun 2022 15:59:39 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new f0bcbf65 allow double-rollback, warn on rollback+commit
f0bcbf65 is described below

commit f0bcbf65862c8e44e245bda21ea078803dcd5ad0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jun 7 15:59:35 2022 +0200

    allow double-rollback, warn on rollback+commit
---
 src/exchangedb/plugin_exchangedb_postgres.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index e933bfcf..355508d4 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -4165,6 +4165,7 @@ postgres_start (void *cls,
     GNUNET_PQ_EXECUTE_STATEMENT_END
   };
 
+  GNUNET_assert (NULL != name);
   if (GNUNET_SYSERR ==
       postgres_preflight (pg))
     return GNUNET_SYSERR;
@@ -4202,6 +4203,7 @@ postgres_start_read_committed (void *cls,
     GNUNET_PQ_EXECUTE_STATEMENT_END
   };
 
+  GNUNET_assert (NULL != name);
   if (GNUNET_SYSERR ==
       postgres_preflight (pg))
     return GNUNET_SYSERR;
@@ -4235,9 +4237,14 @@ postgres_rollback (void *cls)
     GNUNET_PQ_EXECUTE_STATEMENT_END
   };
 
+  if (NULL == pg->transaction_name)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Skipping rollback, no transaction active\n");
+    return;
+  }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Rolling back transaction on %p\n",
-              pg->conn);
+              "Rolling back transaction\n");
   GNUNET_break (GNUNET_OK ==
                 GNUNET_PQ_exec_statements (pg->conn,
                                            es));
@@ -4260,6 +4267,10 @@ postgres_commit (void *cls)
   };
   enum GNUNET_DB_QueryStatus qs;
 
+  GNUNET_break (NULL != pg->transaction_name);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Committing transaction `%s'\n",
+              pg->transaction_name);
   qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
                                            "do_commit",
                                            params);

-- 
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]