Fix obtain the AOF file length error when load AOF#9510
Merged
oranagra merged 2 commits intoredis:unstablefrom Sep 26, 2021
chenyang8094:get-aof-size-use-open
Merged
Fix obtain the AOF file length error when load AOF#9510oranagra merged 2 commits intoredis:unstablefrom chenyang8094:get-aof-size-use-open
oranagra merged 2 commits intoredis:unstablefrom
chenyang8094:get-aof-size-use-open
Conversation
Member
|
this is a regression from #9012 (luckily not released yet). @YaacovHazan FYI. |
oranagra
reviewed
Sep 16, 2021
Contributor
|
Yes, and |
Contributor
BTW, has the RDB part work started? @YaacovHazan |
oranagra
approved these changes
Sep 26, 2021
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.
When redis executes
loadDataFromDiskafter startup, sinceserver.aof_fdis still -1 at this time,aofUpdateCurrentSizewill not be able to get the loaded AOF size and will report the following error. I think in this case we can try to useopento get the real size.57831:M 16 Sep 2021 09:37:25.907 # Server initialized
57831:M 16 Sep 2021 09:37:25.907 # Unable to obtain the AOF file length. stat: Bad file descriptor
57831:M 16 Sep 2021 09:37:25.907 * DB loaded from append only file: 0.000 seconds
57831:M 16 Sep 2021 09:37:25.907 * Ready to accept connections