Timeout long-running snapshots
Add logic to timeout long-running snapshots.
This commit is contained in:
parent
400f65f557
commit
4e9fa2a206
6 changed files with 86 additions and 20 deletions
|
@ -631,9 +631,21 @@ snapshot_store(LedgerCache0, Penciller, Inker, SnapType, Query) ->
|
|||
LedgerCache#ledger_cache.index,
|
||||
LedgerCache#ledger_cache.min_sqn,
|
||||
LedgerCache#ledger_cache.max_sqn},
|
||||
LongRunning =
|
||||
case Query of
|
||||
undefined ->
|
||||
true;
|
||||
no_lookup ->
|
||||
true;
|
||||
_ ->
|
||||
% If a specific query has been defined, then not expected
|
||||
% to be long running
|
||||
false
|
||||
end,
|
||||
PCLopts = #penciller_options{start_snapshot = true,
|
||||
source_penciller = Penciller,
|
||||
snapshot_query = Query,
|
||||
snapshot_longrunning = LongRunning,
|
||||
bookies_mem = BookiesMem},
|
||||
{ok, LedgerSnapshot} = leveled_penciller:pcl_start(PCLopts),
|
||||
case SnapType of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue