Skip to content

Commit

Permalink
statesystem: Do not reduce time range condition for root nodes
Browse files Browse the repository at this point in the history
In HistoryBackEndIterator, do not reduce the time range condition for
queuing children nodes when the current node is the root node, as its
time range is not finalized during construction.

Fixes #156

[Fixed] Do not reduce time range condition for root nodes

Signed-off-by: Patrick Tasse <[email protected]>
  • Loading branch information
PatrickTasse committed Sep 30, 2024
1 parent 945b92e commit a19e13c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ public boolean hasNext() {
HTNode currentNode = fSht.readNode(fSeqNumberQueue);
/*
* Compute reduced conditions here to reduce complexity in
* queuing operations.
* queuing operations. Do not reduce for the root node.
*/
TimeRangeCondition subTimes = fTimes.subCondition(currentNode.getNodeStart(), currentNode.getNodeEnd());
TimeRangeCondition subTimes = currentNode.getParentSequenceNumber() == -1 ? fTimes :
fTimes.subCondition(currentNode.getNodeStart(), currentNode.getNodeEnd());
/*
* During the SHT construction, the bounds of the children are
* not final, so we may have queued some nodes which don't
Expand Down

0 comments on commit a19e13c

Please sign in to comment.