This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch support/nifi-1.13
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.13 by this push:
new 2a00999 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.
2a00999 is described below
commit 2a009991cfabdf4c7f2e0eafb304e0d83e7785dc
Author: Mark Payne <[email protected]>
AuthorDate: Mon Mar 8 15:02:42 2021 -0500
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 <[email protected]>
This closes #4873.
---
.../java/org/apache/nifi/provenance/store/WriteAheadStorePartition.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/store/WriteAheadStorePartition.java
b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/store/WriteAheadStorePartition.java
index c32de77..e702b24 100644
---
a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/store/WriteAheadStorePartition.java
+++
b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/store/WriteAheadStorePartition.java
@@ -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++;
}