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

metrics: Use this_shard_id unconditionally #2346

Conversation

StephanDollberg
Copy link
Contributor

a57b17c changed the way local_engine
gets set. It's now only being set after the reactor has been fully
constructed.

This breaks a bunch of metrics that are being registered from the
reactor constructor (main scheduling group metrics, stall detector,
possibly more) as the metrics subsystem uses engine_is_ready which
internally checks whether local_engine is set. With this not being the
case it would set the shard id to 0 for all shards.

Remove the extra check to engine_is_ready as the shard id is
initialized before the reactor is being constructed so this is safe to
use directly.

a57b17c changed the way `local_engine`
gets set. It's now only being set after the reactor has been fully
constructed.

This breaks a bunch of metrics that are being registered from the
reactor constructor (main scheduling group metrics, stall detector,
possibly more) as the metrics subsystem uses `engine_is_ready` which
internally checks whether `local_engine` is set. With this not being the
case it would set the shard id to 0 for all shards.

Remove the extra check to `engine_is_ready` as the shard id is
initialized before the reactor is being constructed so this is safe to
use directly.
@StephanDollberg
Copy link
Contributor Author

@tchaikov did you have a chance to look at this?

@tchaikov
Copy link
Contributor

@tchaikov did you have a chance to look at this?

not yet, but will do early tomorrow.

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

lgtm.

@tchaikov
Copy link
Contributor

@vladzcloudius hi Vlad, this change practically reverts your change of ff098c8. do you mind taking a look ?

@StephanDollberg
Copy link
Contributor Author

Thanks folks, could someone hit the merge button?

@tchaikov
Copy link
Contributor

@scylladb/seastar-maint hello maintainers, could you help merge this change?

@avikivity avikivity merged commit 6706504 into scylladb:master Jul 17, 2024
14 checks passed
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.

None yet

4 participants