Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
127616: spanconfig: log spanconfig changes r=iskettaneh a=iskettaneh Whenever there is a SpanConfig change, log it to the distribution channel. Note that we only log changes if it modifies something in the SpanConfig other than the ProtectedTimestamps to reduce the number of things to log. Commands used: ``` CREATE TABLE test1 (a int, b int); ALTER TABLE test1 CONFIGURE ZONE USING num_replicas = 5; ``` OUTPUT ``` I240725 19:06:57.232300 1261 13@spanconfig/spanconfigstore/store.go:373 ⋮ [T1,Vsystem,n1,job=‹AUTO SPAN CONFIG RECONCILIATION id=989147442139496449›] 2124 Changing the SpanConfig for Span:‹/Table/10{4-5}› From:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:3 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} To:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:07:03.237846 618 13@spanconfig/spanconfigstore/store.go:373 ⋮ [T1,Vsystem,n1] 2125 Changing the SpanConfig for Span:‹/Table/10{4-5}› From:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:3 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} To:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} ``` Continuing the commands: ``` CREATE INDEX test1index ON test1(b); ALTER INDEX test1@test1index CONFIGURE ZONE USING num_replicas = 4; ``` Output ``` I240725 19:08:09.255002 1261 13@spanconfig/spanconfigstore/store.go:364 ⋮ [T1,Vsystem,n1,job=‹AUTO SPAN CONFIG RECONCILIATION id=989147442139496449›] 2127 Changing the span boundaries for Span:‹/Table/104{-/2}› From:[/Table/104:/Table/105) To:[/Table/104:/Table/104/2) With config: {RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:09.255056 1261 13@spanconfig/spanconfigstore/store.go:364 ⋮ [T1,Vsystem,n1,job=‹AUTO SPAN CONFIG RECONCILIATION id=989147442139496449›] 2128 Changing the span boundaries for Span:‹/Table/104/{2-3}› From:[/Table/104:/Table/105) To:[/Table/104/2:/Table/104/3) With config: {RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:4 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:09.255076 1261 13@spanconfig/spanconfigstore/store.go:373 ⋮ [T1,Vsystem,n1,job=‹AUTO SPAN CONFIG RECONCILIATION id=989147442139496449›] 2129 Changing the SpanConfig for Span:‹/Table/104/{2-3}› From:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} To:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:4 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:09.255096 1261 13@spanconfig/spanconfigstore/store.go:364 ⋮ [T1,Vsystem,n1,job=‹AUTO SPAN CONFIG RECONCILIATION id=989147442139496449›] 2130 Changing the span boundaries for Span:‹/Table/10{4/3-5}› From:[/Table/104:/Table/105) To:[/Table/104/3:/Table/105) With config: {RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:15.236237 618 13@spanconfig/spanconfigstore/store.go:364 ⋮ [T1,Vsystem,n1] 2131 Changing the span boundaries for Span:‹/Table/104{-/2}› From:[/Table/104:/Table/105) To:[/Table/104:/Table/104/2) With config: {RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:15.236321 618 13@spanconfig/spanconfigstore/store.go:364 ⋮ [T1,Vsystem,n1] 2132 Changing the span boundaries for Span:‹/Table/104/{2-3}› From:[/Table/104/2:/Table/105) To:[/Table/104/2:/Table/104/3) With config: {RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:4 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} I240725 19:08:15.236346 618 13@spanconfig/spanconfigstore/store.go:373 ⋮ [T1,Vsystem,n1] 2133 Changing the SpanConfig for Span:‹/Table/104/{2-3}› From:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:5 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} To:{RangeMinBytes:134217728 RangeMaxBytes:536870912 GCPolicy:{TTLSeconds:14400 ProtectionPolicies:[] IgnoreStrictEnforcement:false} GlobalReads:false NumReplicas:4 NumVoters:0 Constraints:[] VoterConstraints:[] LeasePreferences:[] RangefeedEnabled:false ExcludeDataFromBackup:false} ``` Fixes: cockroachdb#127171 Release note: None Co-authored-by: Ibrahim Kettaneh <[email protected]>
- Loading branch information