mirror of https://github.com/apache/nifi.git
NIFI-1527: Fixed issue that resulted in resource claims' claimant count getting incremented twice on restart
Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
4c5263220c
commit
122cba0ee7
|
@ -239,8 +239,8 @@ public class FileSystemSwapManager implements FlowFileSwapManager {
|
|||
return swapLocations;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public SwapSummary getSwapSummary(final String swapLocation) throws IOException {
|
||||
final File swapFile = new File(swapLocation);
|
||||
|
||||
|
@ -274,7 +274,7 @@ public class FileSystemSwapManager implements FlowFileSwapManager {
|
|||
// Before swap encoding version 8, we did not write out the max record id, so we have to read all
|
||||
// swap files to determine the max record id
|
||||
final List<ResourceClaim> resourceClaims = new ArrayList<>(numRecords);
|
||||
final List<FlowFileRecord> records = deserializeFlowFiles(in, numRecords, swapEncodingVersion, true, claimManager);
|
||||
final List<FlowFileRecord> records = deserializeFlowFiles(in, numRecords, swapEncodingVersion, false, claimManager);
|
||||
for (final FlowFileRecord record : records) {
|
||||
if (maxRecordId == null || record.getId() > maxRecordId) {
|
||||
maxRecordId = record.getId();
|
||||
|
|
Loading…
Reference in New Issue