resolve #7124: ensure -s also deletes work_shards
This commit is contained in:
parent
e7d4183d1c
commit
070f442a11
@ -105,7 +105,7 @@ run (void *cls,
|
|||||||
if (clear_shards)
|
if (clear_shards)
|
||||||
{
|
{
|
||||||
if (0 >
|
if (0 >
|
||||||
plugin->delete_revolving_shards (plugin->cls))
|
plugin->delete_shard_locks (plugin->cls))
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Clearing revolving shards failed!\n");
|
"Clearing revolving shards failed!\n");
|
||||||
|
@ -2743,11 +2743,6 @@ prepare_statements (struct PostgresClosure *pg)
|
|||||||
" AND start_row=$2"
|
" AND start_row=$2"
|
||||||
" AND end_row=$3",
|
" AND end_row=$3",
|
||||||
3),
|
3),
|
||||||
/* Used in #postgres_delete_revolving_shards() */
|
|
||||||
GNUNET_PQ_make_prepare (
|
|
||||||
"delete_revolving_shards",
|
|
||||||
"DELETE FROM revolving_work_shards",
|
|
||||||
0),
|
|
||||||
GNUNET_PQ_PREPARED_STATEMENT_END
|
GNUNET_PQ_PREPARED_STATEMENT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11385,16 +11380,17 @@ postgres_release_revolving_shard (void *cls,
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
postgres_delete_revolving_shards (void *cls)
|
postgres_delete_shard_locks (void *cls)
|
||||||
{
|
{
|
||||||
struct PostgresClosure *pg = cls;
|
struct PostgresClosure *pg = cls;
|
||||||
struct GNUNET_PQ_QueryParam params[] = {
|
struct GNUNET_PQ_ExecuteStatement es[] = {
|
||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_make_execute ("DELETE FROM work_shards;"),
|
||||||
|
GNUNET_PQ_make_execute ("DELETE FROM revolving_work_shards;"),
|
||||||
|
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
return GNUNET_PQ_exec_statements (pg->conn,
|
||||||
"delete_revolving_shards",
|
es);
|
||||||
params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -11630,8 +11626,8 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
|
|||||||
= &postgres_begin_revolving_shard;
|
= &postgres_begin_revolving_shard;
|
||||||
plugin->release_revolving_shard
|
plugin->release_revolving_shard
|
||||||
= &postgres_release_revolving_shard;
|
= &postgres_release_revolving_shard;
|
||||||
plugin->delete_revolving_shards
|
plugin->delete_shard_locks
|
||||||
= &postgres_delete_revolving_shards;
|
= &postgres_delete_shard_locks;
|
||||||
return plugin;
|
return plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4022,7 +4022,7 @@ struct TALER_EXCHANGEDB_Plugin
|
|||||||
* @return transaction status code
|
* @return transaction status code
|
||||||
*/
|
*/
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
(*delete_revolving_shards)(void *cls);
|
(*delete_shard_locks)(void *cls);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO-oec: add function for adding extension config
|
* TODO-oec: add function for adding extension config
|
||||||
|
Loading…
Reference in New Issue
Block a user