-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
kvserver: add cluster setting to disable transactionally writing node… #85593
Conversation
Tip: make the bool a Also, you'll need to update the initialization code in various places that set that boolean to the desired default value, for use in tests. I'm also curious as to why the cluster setting is only used in some places and not all, and why there's no opt-out for decommissioning events. Also, nit, the commit message contains some stray sentences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten and @shralex)
pkg/kv/kvserver/log.go
line 82 at r1 (raw file):
} if !s.cfg.LogRangeAndNodeEvents && !logRangeAndNodeEventsEnabled.Get(&s.ClusterSettings().SV) {
Should this be if !s.cfg.LogRangeAndNodeEvents || !logRangeAndNodeEventsEnabled.Get(&s.ClusterSettings().SV)
?
pkg/kv/kvserver/store.go
line 1111 at r1 (raw file):
" (e.g., split, merge, add/remove voter/non-voter) into system.rangelog"+ "and node join and restart events into system.eventolog", false,
Don't we want this to default to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @shralex)
83f5bba
to
dd5e9ac
Compare
This is something on my radar. The dependency of the low-level transactions on the internal executor leads to special cases I'm going to need to eliminate in 23.1. My plan was to just use the raw KV API to perform these writes. If we're going to just get rid of the writes, that also makes me happy. I'll file an issue tomorrow, just writing this out as I see it fly by. |
Have you considered something akin to the new code for system.eventlog, which performs these writes async now? |
… and range events into system tables Currently splits, merges, and rebalances all log transactionally to the system.rangelog table. Node membership events are logged into the system.eventlog table. This introduces a dependency that can cause issues when these system tables are unavailable. This PR introduces a cluster setting to disable writing these events. Note that decommissioning events aren't control by this setting and are always written. Release note: a new cluster setting (kv.log_range_and_node_events.enabled) is introduced to disable transactionally logging range events (e.g., merges, splits and rebalancing) and node join and restart events to system tables, to remove the dependency on such tables and improve performance. Release justification: stability improvement
bors r+ |
This PR was included in a batch that timed out, it will be automatically retried |
bors r+ |
Already running a review |
Build succeeded: |
… and range events into system tables
Currently splits, merges, and rebalances all log transactionally to the system.rangelog table.
Node membership events are logged into the system.eventlog table. This introduces a dependency
that can cause issues when these system tables are unavailable. This PR introduces a cluster
setting to disable writing these events. Note that decommissioning events aren't control by
this setting and are always written.
Release note: a new cluster setting (kv.log_range_and_node_events.enabled) is introduced to
disable transactionally logging range events (e.g., merges, splits and rebalancing)
and node join and restart events to system tables, to remove the dependency on such tables
and improve performance.
Release justification: stability improvement
FIxes #82535