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

Add paused_purpose to INFO CLIENTS #1564

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from

Conversation

enjoy-binbin
Copy link
Member

@enjoy-binbin enjoy-binbin commented Jan 15, 2025

In #1519, we added paused_actions and paused_timeout_milliseconds,
it would be helpful if we add the paused_purpose since users also
want to know the purpose for the pause.

Currently available options:

  • client_command: trigger by CLIENT PAUSE command.
  • during_shutdown: during shutdown, primary waits the replicas to catch up the offset.
  • during_failover: during failover, primary waits the replica to catch up the offset.
  • none

In valkey-io#1519, we added paused_actions and paused_timeout_milliseconds,
it would be helpful if we add the paused_purpose since users also
want to know the purpose for the pause.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin requested review from soloestoy and a team January 15, 2025 05:29
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.81%. Comparing base (2a1a65b) to head (c442b79).
Report is 9 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1564      +/-   ##
============================================
+ Coverage     70.78%   70.81%   +0.03%     
============================================
  Files           120      121       +1     
  Lines         65046    65149     +103     
============================================
+ Hits          46045    46138      +93     
- Misses        19001    19011      +10     
Files with missing lines Coverage Δ
src/networking.c 88.56% <100.00%> (+0.20%) ⬆️
src/server.c 87.63% <100.00%> (+0.02%) ⬆️
src/server.h 100.00% <ø> (ø)

... and 21 files with indirect coverage changes

Signed-off-by: Binbin <[email protected]>
@zuiderkwast zuiderkwast added the major-decision-pending Major decision pending by TSC team label Jan 15, 2025
@enjoy-binbin enjoy-binbin requested a review from a team January 16, 2025 03:20
src/server.h Outdated Show resolved Hide resolved
@hwware
Copy link
Member

hwware commented Jan 20, 2025

@valkey-io/core-team Please vote for this, Thanks a lot

Comment on lines +4524 to +4530
switch (purpose) {
case PAUSE_BY_CLIENT_COMMAND:
return "client_command";
case PAUSE_DURING_SHUTDOWN:
return "during_shutdown";
case PAUSE_DURING_FAILOVER:
return "during_failover";
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the INFO field, but I think the name and values are not perfect. There's something about the English language that doesn't sound right to me.

paused_purpose:client_command
paused_purpose:during_shutdown
paused_purpose:during_failover

I think the word "purpose" is not correct. Purpose is not what caused something to happen. The purpose is the end goal of some action, not the source.

To describe the source of the pause, I think "cause" or "reason" are better words. "paused_cause" or "paused_reason"?

And "during" is about time. It is the answer to when, not why. Maybe we can find a better word or just skip "during"?

How about "paused_reason:shutdown"? Or "paused_reason:shutdown_in_progress" or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-pending Major decision pending by TSC team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants