Skip to content

Commit

Permalink
Fix dead condidtion in LoadAppendOnlyFile (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk authored Apr 24, 2024
1 parent ee110e4 commit 46795d9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/reader/parsing_aof.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,14 @@ func (aofInfo *INFO) LoadAppendOnlyFile(ctx context.Context, am *AOFManifest, AO
if ret == AOFEmpty {
ret = AOFOk
}
if ret == AOFOk || ret == AOFTruncated {
log.Infof("The AOF File was successfully loaded")
}
if ret == AOFOpenErr || ret == AOFFailed {
if ret == AOFOk || ret == AOFTruncated {
log.Infof("The AOF File was successfully loaded")
if ret == AOFOpenErr {
log.Panicf("There was an error opening the AOF File.")
} else {
if ret == AOFOpenErr {
log.Panicf("There was an error opening the AOF File.")
} else {
log.Panicf("Failed to open AOF File.")
}
log.Panicf("Failed to open AOF File.")
}
return ret
}
Expand Down

0 comments on commit 46795d9

Please sign in to comment.