Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,16 @@ public void testDeletionDuringFlushCompletionIsPersisted() throws Exception {
SystemFileFactory.INSTANCE.getFile(filePath),
sgInfo,
this::closeTsFileProcessor,
(tsFileProcessor, updateMap, systemFlushTime) -> {},
(tsFileProcessor, updateMap, systemFlushTime) -> {
// Take over flushing after asyncClose's guard, before FlushManager registration.
tsFileProcessor.setManagedByFlushManager(true);
},
true);
processor.setTsFileProcessorInfo(new TsFileProcessorInfo(sgInfo));
sgInfo.initTsFileProcessorInfo(processor);
TSRecord record = new TSRecord(deviceId, 1);
record.addTuple(DataPoint.getDataPoint(dataType, measurementId, "1"));
processor.insert(buildInsertRowNodeByTSRecord(record), new long[5]);
processor.setManagedByFlushManager(true);
processor.asyncClose();
Assert.assertNull(processor.getWorkMemTable());

Expand Down Expand Up @@ -312,7 +314,10 @@ private void testDeletionWALWithoutWorkingMemTable(boolean tableModel) throws Ex
SystemFileFactory.INSTANCE.getFile(filePath),
sgInfo,
this::closeTsFileProcessor,
(tsFileProcessor, updateMap, systemFlushTime) -> {},
(tsFileProcessor, updateMap, systemFlushTime) -> {
// Take over flushing after asyncClose's guard, before FlushManager registration.
tsFileProcessor.setManagedByFlushManager(true);
},
true);
processor.setTsFileProcessorInfo(new TsFileProcessorInfo(sgInfo));
sgInfo.initTsFileProcessorInfo(processor);
Expand All @@ -331,7 +336,6 @@ private void testDeletionWALWithoutWorkingMemTable(boolean tableModel) throws Ex
logDeletionForTest(tableModel, 2);

// Use the production close path, while keeping flush execution under test control.
processor.setManagedByFlushManager(true);
try {
processor.asyncClose();
Assert.assertNull(processor.getWorkMemTable());
Expand Down
Loading