tair-opensource / RedisShake

RedisShake is a Redis data processing and migration tool.
https://tair-opensource.github.io/RedisShake/
MIT License
3.86k stars 700 forks source link

Fix dead condition in LoadAppendOnlyFile #792

Closed git-hulk closed 7 months ago

git-hulk commented 7 months ago

Currently, RedisShake checks the AOFOk and AOFTruncated return status inside the error if the condition that would never happen, it should be moved outside.

if ret == AOFOpenErr || ret == AOFFailed {
    if ret == AOFOk || ret == AOFTruncated {
...
CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.