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

Limit CLUSTER_CANT_FAILOVER_DATA_AGE log to 10 times period #1189

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

enjoy-binbin
Copy link
Member

If a replica is step into data_age too old stage, it can not
trigger the failover and currently it can not be automatically
recovered and we will print a log every CLUSTER_CANT_FAILOVER_RELOG_PERIOD,
which is every second. If the primary has not recovered or there is
no manual failover, this log will flood the log file.

In this case, limit its frequency to 10 times period, which is
10 seconds in our code. Also in this data_age too old stage,
the repeated logs also can stand for the progress of the failover.

See also #780 for more details about it.

If a replica is step into data_age too old stage, it can not
trigger the failover and currently it can not be automatically
recovered and we will print a log every CLUSTER_CANT_FAILOVER_RELOG_PERIOD,
which is every second. If the primary has not recovered or there is
no manual failover, this log will flood the log file.

In this case, limit its frequency to 10 times period, which is
10 seconds in our code. Also in this data_age too old stage,
the repeated logs also can stand for the progress of the failover.

See also valkey-io#780 for more details about it.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.73%. Comparing base (a62d1f1) to head (80bd495).
Report is 12 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1189      +/-   ##
============================================
+ Coverage     70.65%   70.73%   +0.07%     
============================================
  Files           114      114              
  Lines         61799    63092    +1293     
============================================
+ Hits          43664    44627     +963     
- Misses        18135    18465     +330     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.19% <100.00%> (-0.13%) ⬇️

... and 91 files with indirect coverage changes

src/cluster_legacy.c Outdated Show resolved Hide resolved
enjoy-binbin and others added 2 commits October 22, 2024 15:09
Co-authored-by: Ping Xie <pingxie@outlook.com>
Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Binbin <binloveplay1314@qq.com>
@enjoy-binbin enjoy-binbin merged commit a21fe71 into valkey-io:unstable Oct 24, 2024
47 checks passed
@enjoy-binbin enjoy-binbin deleted the limit_data_age_log branch October 24, 2024 08:38
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.

2 participants