diff options
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchange-0001-part.sql | 2 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/exchangedb/exchange-0001-part.sql b/src/exchangedb/exchange-0001-part.sql index 1b1d2a38e..d8855b011 100644 --- a/src/exchangedb/exchange-0001-part.sql +++ b/src/exchangedb/exchange-0001-part.sql @@ -925,7 +925,7 @@ CREATE INDEX IF NOT EXISTS work_shards_by_job_name_completed_last_attempt_index ON work_shards (job_name ,completed - ,last_attempt + ,last_attempt ASC ); diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 2c113cf19..7a908398d 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -3362,8 +3362,8 @@ prepare_statements (struct PostgresClosure *pg) ",end_row" " FROM work_shards" " WHERE job_name=$1" - " AND last_attempt<$2" " AND completed=FALSE" + " AND last_attempt<$2" " ORDER BY last_attempt ASC" " LIMIT 1;", 2), @@ -12626,7 +12626,7 @@ postgres_begin_shard (void *cls, { struct PostgresClosure *pg = cls; - for (unsigned int retries = 0; retries<3; retries++) + for (unsigned int retries = 0; retries<10; retries++) { if (GNUNET_OK != postgres_start (pg, |