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

Merged
merged 2 commits into from
Dec 19, 2024

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]>
src/cluster_legacy.c Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.76%. Comparing base (377ed22) to head (13f9139).
Report is 71 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1341      +/-   ##
============================================
- Coverage     70.77%   70.76%   -0.02%     
============================================
  Files           116      119       +3     
  Lines         63280    64727    +1447     
============================================
+ Hits          44787    45802    +1015     
- Misses        18493    18925     +432     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.88% <ø> (+0.27%) ⬆️

... and 67 files with indirect coverage changes

@enjoy-binbin enjoy-binbin requested a review from PingXie November 27, 2024 16:34
Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

I have no concerns with this.

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Yes, if you need this info in the log, then I think you're right.

src/cluster_legacy.c Outdated Show resolved Hide resolved
Co-authored-by: Ping Xie <[email protected]>
Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin merged commit 9702995 into valkey-io:unstable Dec 19, 2024
47 checks passed
@enjoy-binbin enjoy-binbin deleted the minor_log_fix branch December 19, 2024 08:12
kronwerk pushed a commit to kronwerk/valkey that referenced this pull request Jan 27, 2025
…o#1341)

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]>
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.

4 participants