-try to fix wirewatch loop
This commit is contained in:
parent
97f46a01cd
commit
8f33fe5311
@ -377,6 +377,8 @@ handle_soft_error (void)
|
||||
}
|
||||
/* Reset to beginning of transaction, and go again
|
||||
from there. */
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Encountered soft error, resetting start point to batch start\n");
|
||||
latest_row_off = batch_start;
|
||||
GNUNET_assert (NULL == task);
|
||||
task = GNUNET_SCHEDULER_add_now (&continue_with_shard,
|
||||
@ -595,6 +597,7 @@ process_reply (const struct TALER_BANK_CreditDetails *details,
|
||||
break;
|
||||
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
|
||||
/* normal case */
|
||||
progress = true;
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Completed shard %s (%llu,%llu] after %s\n",
|
||||
job_name,
|
||||
@ -606,6 +609,12 @@ process_reply (const struct TALER_BANK_CreditDetails *details,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (! progress)
|
||||
{
|
||||
db_plugin->rollback (db_plugin->cls);
|
||||
}
|
||||
else
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Committing %s progress (%llu,%llu] at %llu\n (%s)",
|
||||
job_name,
|
||||
@ -624,6 +633,8 @@ process_reply (const struct TALER_BANK_CreditDetails *details,
|
||||
return;
|
||||
case GNUNET_DB_STATUS_SOFT_ERROR:
|
||||
/* reduce transaction size to reduce rollback probability */
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Got DB soft error on commit. Reducing transaction size.\n");
|
||||
handle_soft_error ();
|
||||
return;
|
||||
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
|
||||
@ -632,6 +643,7 @@ process_reply (const struct TALER_BANK_CreditDetails *details,
|
||||
/* normal case */
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shard_done)
|
||||
{
|
||||
shard_delay = GNUNET_TIME_absolute_get_duration (shard_start_time);
|
||||
|
Loading…
Reference in New Issue
Block a user