You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/08 07:42:47 UTC

[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #3926: Inefficient Usage of JCF

SteveYurongSu commented on a change in pull request #3926:
URL: https://github.com/apache/iotdb/pull/3926#discussion_r704133554



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
##########
@@ -746,7 +747,8 @@ public void syncFlush() throws IOException {
     synchronized (tmpMemTable) {
       try {
         long startWait = System.currentTimeMillis();
-        while (flushingMemTables.contains(tmpMemTable)) {
+        HashSet<IMemTable> flushingMemSet = new HashSet<>(flushingMemTables);
+        while (flushingMemSet.contains(tmpMemTable)) {

Review comment:
       I think the change here may cause concurrent issues: `flushingMemTables` may be changed by other working threads.




-- 
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-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org