Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor log fixes when failover auth denied due to slot epoch #1341

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

enjoy-binbin
Copy link
Member

The old reqEpoch mainly refers to requestCurrentEpoch, see:

    if (requestCurrentEpoch < server.cluster->currentEpoch) {
        serverLog(LL_WARNING, "Failover auth denied to %.40s (%s): reqEpoch (%llu) < curEpoch(%llu)", node->name,
                  node->human_nodename, (unsigned long long)requestCurrentEpoch,
                  (unsigned long long)server.cluster->currentEpoch);
        return;
    }

And in here we refer to requestConfigEpoch, it's a bit misleading,
so change it to reqConfigEpoch to make it clear.

The old reqEpoch mainly refers to requestCurrentEpoch, see:
```
    if (requestCurrentEpoch < server.cluster->currentEpoch) {
        serverLog(LL_WARNING, "Failover auth denied to %.40s (%s): reqEpoch (%llu) < curEpoch(%llu)", node->name,
                  node->human_nodename, (unsigned long long)requestCurrentEpoch,
                  (unsigned long long)server.cluster->currentEpoch);
        return;
    }
```

And in here we refer to requestConfigEpoch, it's a bit misleading,
so change it to reqConfigEpoch to make it clear.

Signed-off-by: Binbin <[email protected]>
Comment on lines +4686 to +4687
serverLog(LL_NOTICE, "Starting a failover election for epoch %llu, node epoch is %llu",
(unsigned long long)server.cluster->currentEpoch, (unsigned long long)nodeEpoch(myself));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am struggling with the changes here. If it is not needed, you can use the review suggestion to remove it.

Suggested change
serverLog(LL_NOTICE, "Starting a failover election for epoch %llu, node epoch is %llu",
(unsigned long long)server.cluster->currentEpoch, (unsigned long long)nodeEpoch(myself));
serverLog(LL_NOTICE, "Starting a failover election for epoch %llu.",
(unsigned long long)server.cluster->currentEpoch);

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.78%. Comparing base (377ed22) to head (e161367).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1341      +/-   ##
============================================
+ Coverage     70.77%   70.78%   +0.01%     
============================================
  Files           116      116              
  Lines         63280    63280              
============================================
+ Hits          44787    44794       +7     
+ Misses        18493    18486       -7     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.33% <100.00%> (-0.29%) ⬇️

... and 8 files with indirect coverage changes

---- 🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant