[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[exchange] branch master updated: database transform towards #9053: enab
From: |
Admin |
Subject: |
[exchange] branch master updated: database transform towards #9053: enable incremental iterating over sanction list |
Date: |
Tue, 03 Jun 2025 14:06:53 +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 7ecc2c5cf database transform towards #9053: enable incremental
iterating over sanction list
7ecc2c5cf is described below
commit 7ecc2c5cf10f27caad5c2f1aefa8a135cc884667
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jun 3 14:06:41 2025 +0200
database transform towards #9053: enable incremental iterating over
sanction list
---
src/exchange/taler-exchange-sanctionscheck.c | 5 +++++
src/exchangedb/pg_select_all_kyc_attributes.c | 4 ++++
src/exchangedb/pg_select_all_kyc_attributes.h | 4 +++-
src/include/taler_exchangedb_plugin.h | 4 +++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-sanctionscheck.c
b/src/exchange/taler-exchange-sanctionscheck.c
index 1719487af..ea79da489 100644
--- a/src/exchange/taler-exchange-sanctionscheck.c
+++ b/src/exchange/taler-exchange-sanctionscheck.c
@@ -109,6 +109,10 @@ static struct Account *acc_head;
*/
static struct Account *acc_tail;
+/**
+ * Minimum row ID to process records from.
+ */
+static uint64_t min_row_id;
/**
* We're being aborted with CTRL-C (or SIGTERM). Shut down.
@@ -479,6 +483,7 @@ run (void *cls,
return;
}
qs = db_plugin->select_all_kyc_attributes (db_plugin->cls,
+ min_row_id,
&account_cb,
NULL);
if (qs < 0)
diff --git a/src/exchangedb/pg_select_all_kyc_attributes.c
b/src/exchangedb/pg_select_all_kyc_attributes.c
index 94991b2b9..f25d64ca8 100644
--- a/src/exchangedb/pg_select_all_kyc_attributes.c
+++ b/src/exchangedb/pg_select_all_kyc_attributes.c
@@ -123,11 +123,13 @@ get_attributes_cb (void *cls,
enum GNUNET_DB_QueryStatus
TEH_PG_select_all_kyc_attributes (
void *cls,
+ uint64_t min_row_id,
TALER_EXCHANGEDB_AllAttributesCallback cb,
void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_uint64 (&min_row_id),
GNUNET_PQ_query_param_end
};
struct GetAttributesContext ctx = {
@@ -155,6 +157,8 @@ TEH_PG_select_all_kyc_attributes (
" ON (ka.h_payto = lo.h_payto)"
/* **IF** we joined with 'lo', the lo must be active */
" WHERE COALESCE(lo.is_active,TRUE)"
+ " AND kyc_attributes_serial_id > $1"
+ " ORDER BY kyc_attributes_serial_id ASC"
);
qs = GNUNET_PQ_eval_prepared_multi_select (
pg->conn,
diff --git a/src/exchangedb/pg_select_all_kyc_attributes.h
b/src/exchangedb/pg_select_all_kyc_attributes.h
index 5e876209a..802b6ef66 100644
--- a/src/exchangedb/pg_select_all_kyc_attributes.h
+++ b/src/exchangedb/pg_select_all_kyc_attributes.h
@@ -27,9 +27,10 @@
/**
- * Lookup all KYC attributes.
+ * Lookup all KYC attributes above @a min_row_id.
*
* @param cls closure
+ * @param min_row_id minimum row ID to return (exclusive)
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
@@ -37,6 +38,7 @@
enum GNUNET_DB_QueryStatus
TEH_PG_select_all_kyc_attributes (
void *cls,
+ uint64_t min_row_id,
TALER_EXCHANGEDB_AllAttributesCallback cb,
void *cb_cls);
diff --git a/src/include/taler_exchangedb_plugin.h
b/src/include/taler_exchangedb_plugin.h
index 3140540f1..7ff27f60e 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -7500,9 +7500,10 @@ struct TALER_EXCHANGEDB_Plugin
/**
- * Lookup all KYC attributes.
+ * Lookup all KYC attributes above @a min_row_id.
*
* @param cls closure
+ * @param min_row_id minimum row ID to return (exclusive)
* @param cb callback to invoke on each match
* @param cb_cls closure for @a cb
* @return database transaction status
@@ -7510,6 +7511,7 @@ struct TALER_EXCHANGEDB_Plugin
enum GNUNET_DB_QueryStatus
(*select_all_kyc_attributes)(
void *cls,
+ uint64_t min_row_id,
TALER_EXCHANGEDB_AllAttributesCallback cb,
void *cb_cls);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [exchange] branch master updated: database transform towards #9053: enable incremental iterating over sanction list,
Admin <=