NIFI-9464 Fixed race condition between "Timer-Driven" threads when running SiteToSiteProvenanceReportingTask.onTrigger and "Compress Provenance Log" threads running EventFileCompressos.run that can cause the SiteToSiteProvenanceReportingTask.onTrigger to pair an already compressed .prov.gz file with a .toc file that corresponds to the uncompressed .prov file. (#8157)

Co-authored-by: Tamas Palfy <tpalfy@apache.org>
This commit is contained in:
tpalfy 2024-01-08 20:30:28 +01:00 committed by Pierre Villard
parent 255e2a1743
commit d9a5a01371
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
2 changed files with 3 additions and 4 deletions

View File

@ -106,6 +106,6 @@ public class EncryptedWriteAheadProvenanceRepository extends WriteAheadProvenanc
};
// Delegate the init to the parent impl
super.init(recordWriterFactory, recordReaderFactory, eventReporter, authorizer, resourceFactory);
super.init(recordWriterFactory, recordReaderFactory, eventReporter, authorizer, resourceFactory, fileManager);
}
}

View File

@ -137,13 +137,12 @@ public class WriteAheadProvenanceRepository implements ProvenanceRepository {
}
};
init(recordWriterFactory, recordReaderFactory, eventReporter, authorizer, resourceFactory);
init(recordWriterFactory, recordReaderFactory, eventReporter, authorizer, resourceFactory, fileManager);
}
synchronized void init(RecordWriterFactory recordWriterFactory, RecordReaderFactory recordReaderFactory,
final EventReporter eventReporter, final Authorizer authorizer,
final ProvenanceAuthorizableFactory resourceFactory) throws IOException {
final EventFileManager fileManager = new EventFileManager();
final ProvenanceAuthorizableFactory resourceFactory, final EventFileManager fileManager) throws IOException {
eventStore = new PartitionedWriteAheadEventStore(config, recordWriterFactory, recordReaderFactory, eventReporter, fileManager);