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_actions for INFO stats #1519

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

Conversation

soloestoy
Copy link
Member

@soloestoy soloestoy commented Jan 7, 2025

Add paused_actions for INFO stats to inform users about the instance's running status.

Signed-off-by: zhaozhao.zz <[email protected]>
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.86%. Comparing base (b3b4bdc) to head (7afc8a6).
Report is 5 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1519      +/-   ##
============================================
+ Coverage     70.83%   70.86%   +0.02%     
============================================
  Files           120      120              
  Lines         64911    64916       +5     
============================================
+ Hits          45982    46000      +18     
+ Misses        18929    18916      -13     
Files with missing lines Coverage Δ
src/server.c 87.47% <100.00%> (+<0.01%) ⬆️

... and 18 files with indirect coverage changes

@madolson madolson added the major-decision-pending Major decision pending by TSC team label Jan 7, 2025
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 think this is a good info field to add.

@@ -5863,6 +5863,8 @@ sds genValkeyInfoString(dict *section_dict, int all_sections, int everything) {
server.stat_last_eviction_exceeded_time ? (long long)elapsedUs(server.stat_last_eviction_exceeded_time) : 0;
long long current_active_defrag_time =
server.stat_last_active_defrag_time ? (long long)elapsedUs(server.stat_last_active_defrag_time) : 0;
char *paused_actions = server.paused_actions & PAUSE_ACTION_CLIENT_ALL ? "all" : server.paused_actions & PAUSE_ACTION_CLIENT_WRITE ? "write"
Copy link
Member

@madolson madolson Jan 7, 2025

Choose a reason for hiding this comment

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

Paused actions will never return "all" right? If it's all, it won't execute the command running "all". It's fine, but just worth mentioning this will only show write or none.

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.

Just fix the format error and it's good for me.

r client unpause

r multi
r client PAUSE 1000 All
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit pick: I find it weird seeing it in mixed case :| . Could we write it in lower or upper case?

Suggested change
r client PAUSE 1000 All
r client PAUSE 1000 ALL

@@ -5930,7 +5932,8 @@ sds genValkeyInfoString(dict *section_dict, int all_sections, int everything) {
"eventloop_duration_sum:%llu\r\n", server.duration_stats[EL_DURATION_TYPE_EL].sum,
"eventloop_duration_cmd_sum:%llu\r\n", server.duration_stats[EL_DURATION_TYPE_CMD].sum,
"instantaneous_eventloop_cycles_per_sec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_CYCLE),
"instantaneous_eventloop_duration_usec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_DURATION)));
"instantaneous_eventloop_duration_usec:%llu\r\n", getInstantaneousMetric(STATS_METRIC_EL_DURATION),
"paused_actions:%s\r\n", paused_actions));
Copy link
Contributor

Choose a reason for hiding this comment

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

The end time of the paused action is also a key information. Is this considered for inclusion?

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