valkey-io / valkey

A flexible distributed key-value datastore that is optimized for caching and other realtime workloads.
https://valkey.io
Other
17.42k stars 656 forks source link

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

Open enjoy-binbin opened 4 days ago

enjoy-binbin commented 4 days ago

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.

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/valkey-io/valkey/pull/1341?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valkey-io) | Coverage Δ | | |---|---|---| | [src/cluster\_legacy.c](https://app.codecov.io/gh/valkey-io/valkey/pull/1341?src=pr&el=tree&filepath=src%2Fcluster_legacy.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valkey-io#diff-c3JjL2NsdXN0ZXJfbGVnYWN5LmM=) | `86.33% <100.00%> (-0.29%)` | :arrow_down: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/valkey-io/valkey/pull/1341/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valkey-io)

🚨 Try these New Features: