jt2594838 commented on code in PR #12476: URL: https://github.com/apache/iotdb/pull/12476#discussion_r1625221331
########## iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java: ########## @@ -535,12 +535,13 @@ public void run() { memTableIdsOfWal .computeIfAbsent(currentWALFileVersion, memTableIds -> new HashSet<>()) .addAll(info.metaData.getMemTablesId()); - checkpointManager.updateCostOfActiveMemTables(info.memTableId2WalDiskUsage); + checkpointManager.updateCostOfActiveMemTables(info.memTableId2WalDiskUsage, compressionRate); boolean forceSuccess = false; // try to roll log writer if (info.rollWALFileWriterListener != null - || (forceFlag && currentWALFileWriter.size() >= config.getWalFileSizeThresholdInByte())) { + || (forceFlag + && currentWALFileWriter.originalSize() >= config.getWalFileSizeThresholdInByte())) { Review Comment: So, in the end, you want to control the number of WALFlushListeners (and ultimately their corresponding memory). Then, why not just use the number of WALFlushListeners (or their corresponding memory) as one of the predicates? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org