This is an automated email from the ASF dual-hosted git repository.

jt2594838 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new a7b88b1027e [Test] Fix deletion regression test flush control (#18888)
a7b88b1027e is described below

commit a7b88b1027e1b84607506681845d1e2520cfc8bc
Author: Caideyipi <[email protected]>
AuthorDate: Thu Oct 15 17:09:01 2026 +0800

    [Test] Fix deletion regression test flush control (#18888)
---
 .../dataregion/memtable/TsFileProcessorTest.java             | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessorTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessorTest.java
index 324bf78a37e..61a672ebdcf 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessorTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessorTest.java
@@ -229,14 +229,16 @@ public class TsFileProcessorTest {
               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());
 
@@ -312,7 +314,10 @@ public class TsFileProcessorTest {
               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);
@@ -331,7 +336,6 @@ public class TsFileProcessorTest {
       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());

Reply via email to