Extend API
To support max_keys and the last modified date range. This applies the last modified date check on all ledger folds. This is hard to avoid, but ultimately a very low cost. The limit on the number of heads to fold, is the limit based on passing to the accumulator - not on the limit being added to the accumulator. So if the FoldFun perfoms a filter (e.g. for the preflist), then those filtered results will still count towards the maximum. There needs to be someway at the end of signalling from the fold if the outcome was or was not 'constrained' by max_keys - as the fold cannot simply tel by lenght checking the outcome. Note this is used rather than length checking the buffer and throwing a 'stop_fold' message when the limit is reached. The choice is made for simplicity, and ease of testing. The throw mechanism is necessary if there is a need to stop parallel folds across the the cluster - but in this case the node_worker_pool will be used.
This commit is contained in:
parent
1f976948a1
commit
11627bbdd9
4 changed files with 132 additions and 29 deletions
|
@ -94,6 +94,7 @@
|
|||
% if the object has siblings in the store will be the maximum of those
|
||||
% dates
|
||||
integer()|undefined.
|
||||
-type lastmod_range() :: {integer(), pos_integer()|infinity}.
|
||||
|
||||
-type ledger_status() ::
|
||||
tomb|{active, non_neg_integer()|infinity}.
|
||||
|
@ -140,7 +141,8 @@
|
|||
index_specs/0,
|
||||
segment_list/0,
|
||||
maybe_lookup/0,
|
||||
last_moddate/0]).
|
||||
last_moddate/0,
|
||||
lastmod_range/0]).
|
||||
|
||||
|
||||
%%%============================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue