You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "caozj1011 (via GitHub)" <gi...@apache.org> on 2023/08/18 03:05:11 UTC

[GitHub] [iotdb] caozj1011 opened a new pull request, #10900: fix wal npe when memTable has flushed.

caozj1011 opened a new pull request, #10900:
URL: https://github.com/apache/iotdb/pull/10900

   wal obtains IMemTable from memTableInfo twice when deleting obsolete files. The IMemTable is not null when it is obtained the first time, but the imemtable may have been flushed when it is obtained the second time. As a result, the obtained value is null, resulting in NPE


-- 
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


[GitHub] [iotdb] xingtanzjr merged pull request #10900: [To rel/1.2] fix wal npe when memTable has flushed.

Posted by "xingtanzjr (via GitHub)" <gi...@apache.org>.
xingtanzjr merged PR #10900:
URL: https://github.com/apache/iotdb/pull/10900


-- 
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


[GitHub] [iotdb] wangchao316 commented on a diff in pull request #10900: [To rel/1.2] fix wal npe when memTable has flushed.

Posted by "wangchao316 (via GitHub)" <gi...@apache.org>.
wangchao316 commented on code in PR #10900:
URL: https://github.com/apache/iotdb/pull/10900#discussion_r1299511765


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java:
##########
@@ -457,8 +455,8 @@ private void snapshotMemTable(DataRegion dataRegion, File tsFile, MemTableInfo m
           "CheckpointManager$DeleteOutdatedFileTask.snapshotOrFlushOldestMemTable");
       try {
         // make sure snapshot is made before memTable flush operation
-        synchronized (memTable) {
-          if (memTable.getFlushStatus() != FlushStatus.WORKING) {
+        synchronized (this) {

Review Comment:
   sync this class, Does the WAL write performance be affected?



-- 
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


[GitHub] [iotdb] caozj1011 commented on a diff in pull request #10900: [To rel/1.2] fix wal npe when memTable has flushed.

Posted by "caozj1011 (via GitHub)" <gi...@apache.org>.
caozj1011 commented on code in PR #10900:
URL: https://github.com/apache/iotdb/pull/10900#discussion_r1299934886


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java:
##########
@@ -457,8 +455,8 @@ private void snapshotMemTable(DataRegion dataRegion, File tsFile, MemTableInfo m
           "CheckpointManager$DeleteOutdatedFileTask.snapshotOrFlushOldestMemTable");
       try {
         // make sure snapshot is made before memTable flush operation
-        synchronized (memTable) {
-          if (memTable.getFlushStatus() != FlushStatus.WORKING) {
+        synchronized (this) {

Review Comment:
   Your question makes sense. I changed it to memTableInfo



-- 
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