gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (6a46b13e -> b9186bdd)


From: gnunet
Subject: [taler-exchange] branch master updated (6a46b13e -> b9186bdd)
Date: Fri, 20 Mar 2020 13:18:51 +0100

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

grothoff pushed a change to branch master
in repository exchange.

    from 6a46b13e make recoup idempotent and simplify response
     new 2021f759 fix logic to ensure that we do not call the callback after 
the iteration was aborted (caused big trouble in wirewatcher)
     new 159ce744 do not be so super-quiet on (rare) rollbacks
     new e4293ec0 have variant where we first setup all reserves
     new b9186bdd Merge branch 'master' of git+ssh://git.taler.net/exchange

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/bank-lib/bank_api_credit.c           | 31 +++++++++++++++++++------------
 src/bank-lib/bank_api_debit.c            | 31 +++++++++++++++++++------------
 src/benchmark/taler-exchange-benchmark.c | 11 +++++++++--
 src/exchange/taler-exchange-wirewatch.c  |  4 ++--
 4 files changed, 49 insertions(+), 28 deletions(-)

diff --git a/src/bank-lib/bank_api_credit.c b/src/bank-lib/bank_api_credit.c
index 551831d2..4b6f40bb 100644
--- a/src/bank-lib/bank_api_credit.c
+++ b/src/bank-lib/bank_api_credit.c
@@ -113,12 +113,18 @@ parse_account_history (struct 
TALER_BANK_CreditHistoryHandle *hh,
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
     }
-    hh->hcb (hh->hcb_cls,
-             MHD_HTTP_OK,
-             TALER_EC_NONE,
-             row_id,
-             &td,
-             transaction);
+    if (GNUNET_OK !=
+        hh->hcb (hh->hcb_cls,
+                 MHD_HTTP_OK,
+                 TALER_EC_NONE,
+                 row_id,
+                 &td,
+                 transaction))
+    {
+      hh->hcb = NULL;
+      GNUNET_JSON_parse_free (hist_spec);
+      return GNUNET_OK;
+    }
     GNUNET_JSON_parse_free (hist_spec);
   }
   return GNUNET_OK;
@@ -195,12 +201,13 @@ handle_credit_history_finished (void *cls,
     response_code = 0;
     break;
   }
-  hh->hcb (hh->hcb_cls,
-           response_code,
-           ec,
-           0LLU,
-           NULL,
-           j);
+  if (NULL != hh->hcb)
+    hh->hcb (hh->hcb_cls,
+             response_code,
+             ec,
+             0LLU,
+             NULL,
+             j);
   TALER_BANK_credit_history_cancel (hh);
 }
 
diff --git a/src/bank-lib/bank_api_debit.c b/src/bank-lib/bank_api_debit.c
index 1418492e..33ff20ef 100644
--- a/src/bank-lib/bank_api_debit.c
+++ b/src/bank-lib/bank_api_debit.c
@@ -115,12 +115,18 @@ parse_account_history (struct 
TALER_BANK_DebitHistoryHandle *hh,
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
     }
-    hh->hcb (hh->hcb_cls,
-             MHD_HTTP_OK,
-             TALER_EC_NONE,
-             row_id,
-             &td,
-             transaction);
+    if (GNUNET_OK !=
+        hh->hcb (hh->hcb_cls,
+                 MHD_HTTP_OK,
+                 TALER_EC_NONE,
+                 row_id,
+                 &td,
+                 transaction))
+    {
+      hh->hcb = NULL;
+      GNUNET_JSON_parse_free (hist_spec);
+      return GNUNET_OK;
+    }
     GNUNET_JSON_parse_free (hist_spec);
   }
   return GNUNET_OK;
@@ -199,12 +205,13 @@ handle_debit_history_finished (void *cls,
     response_code = 0;
     break;
   }
-  hh->hcb (hh->hcb_cls,
-           response_code,
-           ec,
-           0LLU,
-           NULL,
-           j);
+  if (NULL != hh->hcb)
+    hh->hcb (hh->hcb_cls,
+             response_code,
+             ec,
+             0LLU,
+             NULL,
+             j);
   TALER_BANK_debit_history_cancel (hh);
 }
 
diff --git a/src/benchmark/taler-exchange-benchmark.c 
b/src/benchmark/taler-exchange-benchmark.c
index 95c3ae23..8bfbc42a 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -297,6 +297,9 @@ eval_probability (float probability)
 }
 
 
+static int reserves_first = 1;
+
+
 /**
  * Actual commands construction and execution.
  *
@@ -355,7 +358,9 @@ run (void *cls,
       GNUNET_asprintf (&batch_label,
                        "batch-start-%u",
                        j);
-      all_commands[j * (howmany_coins + 1)]
+      all_commands[reserves_first
+                   ? j
+                   : j * (howmany_coins + 1)]
         = TALER_TESTING_cmd_batch (add_label (batch_label),
                                    make_reserve);
     }
@@ -433,7 +438,9 @@ run (void *cls,
                        "unit-%u-%u",
                        i,
                        j);
-      all_commands[j * (howmany_coins + 1) + (1 + i)]
+      all_commands[reserves_first
+                   ? howmany_reserves + j * howmany_coins + i
+                   : j * (howmany_coins + 1) + (1 + i)]
         = TALER_TESTING_cmd_batch (add_label (unit_label),
                                    unit);
     }
diff --git a/src/exchange/taler-exchange-wirewatch.c 
b/src/exchange/taler-exchange-wirewatch.c
index 04bf2169..ede6220b 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -455,8 +455,8 @@ history_cb (void *cls,
   }
   if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Got DB soft error for reserve_in_insert\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Got DB soft error for reserves_in_insert. Rolling back.\n");
     db_plugin->rollback (db_plugin->cls,
                          session);
     /* try again */

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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