mirror of
https://github.com/apache/nifi.git
synced 2025-02-09 03:25:04 +00:00
NIFI-8299: Because we now iterate over stored events in an unordered map, we need to update maxEventId to Math.max( <current value>, <next value> ) instead of just assigning the next value.
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #4873.
This commit is contained in:
parent
98ab42aebc
commit
dc94ef568a
@ -329,7 +329,7 @@ public class WriteAheadStorePartition implements EventStorePartition {
|
||||
final StorageSummary summaryWithIndex = new StorageSummary(writerSummary.getEventId(), writerSummary.getStorageLocation(), this.partitionName,
|
||||
writerSummary.getBlockIndex(), writerSummary.getSerializedLength(), writerSummary.getBytesWritten());
|
||||
locationMap.put(eventRecord, summaryWithIndex);
|
||||
maxId = summaryWithIndex.getEventId();
|
||||
maxId = Math.max(maxId, summaryWithIndex.getEventId());
|
||||
numEvents++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user