[IOTDB-6262] Pipe: fix NPE while deserializing WAL (caused by non-atomic WAL rename operation during pipe read)#11753
Merged
SteveYurongSu merged 1 commit intoapache:masterfrom Dec 20, 2023
Conversation
…nd throw exception when can not find wal file
HeimingZ
approved these changes
Dec 20, 2023
SteveYurongSu
approved these changes
Dec 20, 2023
SzyWilliam
pushed a commit
to SzyWilliam/iotdb
that referenced
this pull request
Nov 26, 2024
…mic WAL rename operation during pipe read) (apache#11753) Problem: - Due to the concurrent execution of the renaming of the wal file and the reading of the wal file by the pipe, the pipe may not be able to fetch the wal file when it reads the wal file, resulting in an NPE. Solution: 1. change Files.renameTo in wal code to Files.move for better atomicity and visibility. 2. add logging when wal fetches a file 3. add logging when pipe fetches a wal value to print the memtable id and wal file version id that it failed to fetch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Solution:
问题:
解决方案: