You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/memory/ReleaseFlushMonitor.java
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,7 @@ public List<Integer> getRegionsToFlush(long windowsEndTime) {
230
230
publicvoidforceFlushAndRelease() {
231
231
booleanneedFlush;
232
232
while (true) {
233
+
waitUntilWorkerTasksDone();
233
234
needFlush = false;
234
235
for (CachedMTreeStorestore : regionToStoreMap.values()) {
235
236
if (store.getMemoryManager().getBufferNodeNum() > 0) {
@@ -239,13 +240,29 @@ public void forceFlushAndRelease() {
239
240
}
240
241
if (needFlush) {
241
242
scheduler.scheduleFlushAll().join();
243
+
waitUntilWorkerTasksDone();
242
244
scheduler.scheduleRelease(true);
243
245
} else {
246
+
// No volatile nodes left, but clean unpinned cache may still remain after previous flushes.
247
+
scheduler.scheduleRelease(true);
248
+
waitUntilWorkerTasksDone();
244
249
break;
245
250
}
246
251
}
247
252
}
248
253
254
+
@TestOnly
255
+
privatevoidwaitUntilWorkerTasksDone() {
256
+
while (scheduler.getActiveWorkerNum() > 0 || !flushingRegionSet.isEmpty()) {
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/Traverser.java
0 commit comments