diff --git a/docs/generated/eventlog.md b/docs/generated/eventlog.md index aa5a4785a0af..85903e7dc598 100644 --- a/docs/generated/eventlog.md +++ b/docs/generated/eventlog.md @@ -212,6 +212,7 @@ is directly or indirectly a member of the admin role) executes a query. | `NumRetries` | Number of retries, when the txn was reretried automatically by the server. | no | | `FullTableScan` | Whether the query contains a full table scan. | no | | `FullIndexScan` | Whether the query contains a full secondary index scan. | no | +| `TxnCounter` | The sequence number of the SQL transaction inside its session. | no | ### `sensitive_table_access` diff --git a/pkg/kv/kvserver/kvserverpb/state.pb.go b/pkg/kv/kvserver/kvserverpb/state.pb.go index ef7d34d1a284..760eccc0b53d 100644 --- a/pkg/kv/kvserver/kvserverpb/state.pb.go +++ b/pkg/kv/kvserver/kvserverpb/state.pb.go @@ -102,20 +102,20 @@ type ReplicaState struct { // [1]: migration.Manager // [2]: PurgeOutdatedReplicas Version *roachpb.Version `protobuf:"bytes,12,opt,name=version,proto3" json:"version,omitempty"` - // closed_timestamp is the largest timestamp that is known to have been - // closed. This means that the current leaseholder (if any) and any future - // leaseholder will not evaluate writes at or below this timestamp, and also - // that any in-flight commands that can still apply are writing at higher - // timestamps. Non-leaseholder replicas are free to serve "follower reads" at - // or below this timestamp. - ClosedTimestamp hlc.Timestamp `protobuf:"bytes,13,opt,name=closed_timestamp,json=closedTimestamp,proto3" json:"closed_timestamp"` + // raft_closed_timestamp is the largest timestamp that is known to have been + // closed through Raft commands. This means that the current leaseholder (if + // any) and any future leaseholder will not evaluate writes at or below this + // timestamp, and also that any in-flight commands that can still apply are + // writing at higher timestamps. Non-leaseholder replicas are free to serve + // "follower reads" at or below this timestamp. + RaftClosedTimestamp hlc.Timestamp `protobuf:"bytes,13,opt,name=raft_closed_timestamp,json=raftClosedTimestamp,proto3" json:"raft_closed_timestamp"` } func (m *ReplicaState) Reset() { *m = ReplicaState{} } func (m *ReplicaState) String() string { return proto.CompactTextString(m) } func (*ReplicaState) ProtoMessage() {} func (*ReplicaState) Descriptor() ([]byte, []int) { - return fileDescriptor_state_cf048718a8ccf178, []int{0} + return fileDescriptor_state_17c073beb2455887, []int{0} } func (m *ReplicaState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ func (m *RangeInfo) Reset() { *m = RangeInfo{} } func (m *RangeInfo) String() string { return proto.CompactTextString(m) } func (*RangeInfo) ProtoMessage() {} func (*RangeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_state_cf048718a8ccf178, []int{1} + return fileDescriptor_state_17c073beb2455887, []int{1} } func (m *RangeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -223,7 +223,7 @@ func (m *RangeInfo_CTEntry) Reset() { *m = RangeInfo_CTEntry{} } func (m *RangeInfo_CTEntry) String() string { return proto.CompactTextString(m) } func (*RangeInfo_CTEntry) ProtoMessage() {} func (*RangeInfo_CTEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_state_cf048718a8ccf178, []int{1, 0} + return fileDescriptor_state_17c073beb2455887, []int{1, 0} } func (m *RangeInfo_CTEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -259,7 +259,7 @@ func (m *LatchManagerInfo) Reset() { *m = LatchManagerInfo{} } func (m *LatchManagerInfo) String() string { return proto.CompactTextString(m) } func (*LatchManagerInfo) ProtoMessage() {} func (*LatchManagerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_state_cf048718a8ccf178, []int{2} + return fileDescriptor_state_17c073beb2455887, []int{2} } func (m *LatchManagerInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -336,7 +336,7 @@ func (this *ReplicaState) Equal(that interface{}) bool { if !this.Version.Equal(that1.Version) { return false } - if !this.ClosedTimestamp.Equal(&that1.ClosedTimestamp) { + if !this.RaftClosedTimestamp.Equal(&that1.RaftClosedTimestamp) { return false } return true @@ -542,8 +542,8 @@ func (m *ReplicaState) MarshalTo(dAtA []byte) (int, error) { } dAtA[i] = 0x6a i++ - i = encodeVarintState(dAtA, i, uint64(m.ClosedTimestamp.Size())) - n7, err := m.ClosedTimestamp.MarshalTo(dAtA[i:]) + i = encodeVarintState(dAtA, i, uint64(m.RaftClosedTimestamp.Size())) + n7, err := m.RaftClosedTimestamp.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -793,7 +793,7 @@ func (m *ReplicaState) Size() (n int) { l = m.Version.Size() n += 1 + l + sovState(uint64(l)) } - l = m.ClosedTimestamp.Size() + l = m.RaftClosedTimestamp.Size() n += 1 + l + sovState(uint64(l)) return n } @@ -1189,7 +1189,7 @@ func (m *ReplicaState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClosedTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RaftClosedTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1213,7 +1213,7 @@ func (m *ReplicaState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ClosedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RaftClosedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2002,76 +2002,77 @@ var ( ) func init() { - proto.RegisterFile("kv/kvserver/kvserverpb/state.proto", fileDescriptor_state_cf048718a8ccf178) + proto.RegisterFile("kv/kvserver/kvserverpb/state.proto", fileDescriptor_state_17c073beb2455887) } -var fileDescriptor_state_cf048718a8ccf178 = []byte{ - // 1068 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x4f, 0x1b, 0x47, - 0x14, 0x66, 0xe3, 0x35, 0xd8, 0x63, 0x08, 0xce, 0x14, 0xc2, 0x86, 0x04, 0x1b, 0x59, 0x6a, 0x45, - 0xa5, 0x74, 0xad, 0x92, 0xfe, 0x50, 0x7f, 0x48, 0x15, 0x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e, 0x0d, 0xc8, 0x11, 0xf3, 0x61, 0x86, 0xc9, 0x74, - 0xa4, 0xd8, 0xe5, 0xbc, 0x19, 0x29, 0x35, 0x82, 0xca, 0x87, 0x54, 0xfa, 0xdd, 0x23, 0x9a, 0xd0, - 0x10, 0xb8, 0x1e, 0x29, 0x5b, 0x08, 0x71, 0xa0, 0x81, 0xe7, 0xb3, 0x41, 0x22, 0xb5, 0x1c, 0x39, - 0x52, 0x54, 0x48, 0x53, 0x01, 0xea, 0x89, 0xbf, 0xe1, 0x91, 0x84, 0x49, 0xfc, 0x9e, 0x8e, 0x23, - 0x0d, 0x69, 0x42, 0xe3, 0xe9, 0xc5, 0x5f, 0x95, 0x85, 0x8b, 0x71, 0xc5, 0xba, 0x1c, 0x57, 0xac, - 0x77, 0xe3, 0x8a, 0xf5, 0xe7, 0xb8, 0x62, 0xfd, 0x76, 0x55, 0x59, 0xb8, 0xbc, 0xaa, 0x2c, 0xbc, - 0xbb, 0xaa, 0x2c, 0xbc, 0x42, 0xd7, 0xff, 0x0e, 0x3a, 0x8b, 0xfa, 0x17, 0xf6, 0xd9, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x23, 0xeb, 0x99, 0xc3, 0x3e, 0x08, 0x00, 0x00, +var fileDescriptor_state_17c073beb2455887 = []byte{ + // 1077 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x35, 0x2d, 0xca, 0x96, 0x46, 0x76, 0xac, 0x4c, 0xec, 0x98, 0x71, 0x62, 0xc9, 0x10, 0xf0, + 0x7d, 0x70, 0x81, 0x94, 0x42, 0x9d, 0xfe, 0xa0, 0x3f, 0x40, 0x61, 0xc9, 0x45, 0x21, 0xd7, 0x36, + 0xe2, 0x89, 0x90, 0x02, 0xe9, 0x82, 0x18, 0x91, 0xd7, 0x14, 0x21, 0x8a, 0xc3, 0x0c, 0x87, 0x8a, + 0x9d, 0xa7, 0x28, 0xfa, 0x04, 0x7d, 0x1c, 0xa3, 0x2b, 0x2f, 0xb3, 0x12, 0x5a, 0x79, 0xd3, 0x5d, + 0xf7, 0x5d, 0x15, 0x33, 0x43, 0xca, 0xf2, 0x0f, 0x10, 0xef, 0x86, 0xe7, 0x9c, 0x7b, 0x67, 0x78, + 0xee, 0xe1, 0x48, 0xa8, 0x31, 0x18, 0x35, 0x07, 0xa3, 0x04, 0xf8, 0x08, 0xf8, 0x74, 0x11, 0xf7, + 0x9a, 0x89, 0xa0, 0x02, 0xec, 0x98, 0x33, 0xc1, 0x70, 0xdd, 0x65, 0xee, 0x80, 0x33, 0xea, 0xf6, + 0xed, 0xc1, 0xc8, 0xce, 0x45, 0x76, 0x22, 0x18, 0xa7, 0x3e, 0xc4, 0xbd, 0x8d, 0xa7, 0xd9, 0xb2, + 0x09, 0x91, 0x1f, 0x44, 0x10, 0xf7, 0x9a, 0xc3, 0x91, 0xeb, 0xea, 0xea, 0x8d, 0xa7, 0xaa, 0x32, + 0xee, 0x35, 0x83, 0x48, 0x00, 0x8f, 0x68, 0xe8, 0x70, 0x7a, 0x22, 0x32, 0xf2, 0x71, 0x4e, 0x0e, + 0x41, 0x50, 0x8f, 0x0a, 0x9a, 0xe1, 0x38, 0xc7, 0x67, 0x30, 0x2b, 0x15, 0x41, 0xd8, 0xec, 0x87, + 0x6e, 0x53, 0x04, 0x43, 0x48, 0x04, 0x1d, 0xc6, 0x19, 0xb3, 0xea, 0x33, 0x9f, 0xa9, 0x65, 0x53, + 0xae, 0x34, 0xda, 0xf8, 0xad, 0x88, 0x96, 0x08, 0xc4, 0x61, 0xe0, 0xd2, 0x57, 0xf2, 0x6d, 0xf0, + 0x73, 0x84, 0xe5, 0xd6, 0x0e, 0x8d, 0xe3, 0x30, 0x00, 0xcf, 0x09, 0x22, 0x0f, 0x4e, 0x2d, 0x63, + 0xcb, 0xd8, 0x36, 0x49, 0x55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x1e, 0x50, 0xe1, 0xf6, 0x0f, 0x69, 0x44, 0x7d, 0xe0, 0xea, 0x4a, 0xd9, 0x44, 0x88, + 0x03, 0xf5, 0x1c, 0x97, 0xa5, 0x91, 0x50, 0x76, 0x14, 0x48, 0x59, 0x22, 0x6d, 0x09, 0xc8, 0x4f, + 0xfc, 0x1d, 0x0f, 0x04, 0x64, 0xfc, 0xbc, 0xe2, 0x91, 0x82, 0x94, 0xa0, 0xf5, 0xfc, 0xfc, 0xaf, + 0xda, 0xdc, 0xf9, 0xa4, 0x66, 0x5c, 0x4c, 0x6a, 0xc6, 0x87, 0x49, 0xcd, 0xf8, 0x73, 0x52, 0x33, + 0x7e, 0xbd, 0xac, 0xcd, 0x5d, 0x5c, 0xd6, 0xe6, 0x3e, 0x5c, 0xd6, 0xe6, 0xde, 0xa0, 0xab, 0xbf, + 0x09, 0xbd, 0x05, 0xf5, 0x53, 0xfb, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x77, 0xd9, + 0xdc, 0x47, 0x08, 0x00, 0x00, } diff --git a/pkg/kv/kvserver/kvserverpb/state.proto b/pkg/kv/kvserver/kvserverpb/state.proto index ffe40837abc4..3be221bd99ad 100644 --- a/pkg/kv/kvserver/kvserverpb/state.proto +++ b/pkg/kv/kvserver/kvserverpb/state.proto @@ -100,13 +100,13 @@ message ReplicaState { // [2]: PurgeOutdatedReplicas roachpb.Version version = 12; - // closed_timestamp is the largest timestamp that is known to have been - // closed. This means that the current leaseholder (if any) and any future - // leaseholder will not evaluate writes at or below this timestamp, and also - // that any in-flight commands that can still apply are writing at higher - // timestamps. Non-leaseholder replicas are free to serve "follower reads" at - // or below this timestamp. - util.hlc.Timestamp closed_timestamp = 13 [(gogoproto.nullable) = false]; + // raft_closed_timestamp is the largest timestamp that is known to have been + // closed through Raft commands. This means that the current leaseholder (if + // any) and any future leaseholder will not evaluate writes at or below this + // timestamp, and also that any in-flight commands that can still apply are + // writing at higher timestamps. Non-leaseholder replicas are free to serve + // "follower reads" at or below this timestamp. + util.hlc.Timestamp raft_closed_timestamp = 13 [(gogoproto.nullable) = false]; reserved 8, 9, 10; } diff --git a/pkg/kv/kvserver/replica_application_state_machine.go b/pkg/kv/kvserver/replica_application_state_machine.go index ffd6db203916..5c2eb7bd8325 100644 --- a/pkg/kv/kvserver/replica_application_state_machine.go +++ b/pkg/kv/kvserver/replica_application_state_machine.go @@ -454,9 +454,9 @@ func (b *replicaAppBatch) Stage(cmdI apply.Command) (apply.CheckedCommand, error // cmd.proposal.Request filled in. if cmd.IsLocal() && cmd.proposal.Request.IsIntentWrite() { wts := cmd.proposal.Request.WriteTimestamp() - if wts.LessEq(b.state.ClosedTimestamp) { + if wts.LessEq(b.state.RaftClosedTimestamp) { return nil, makeNonDeterministicFailure("writing at %s below closed ts: %s (%s)", - wts, b.state.ClosedTimestamp.String(), cmd.proposal.Request.String()) + wts, b.state.RaftClosedTimestamp.String(), cmd.proposal.Request.String()) } } log.Event(ctx, "applying command") @@ -824,12 +824,12 @@ func (b *replicaAppBatch) stageTrivialReplicatedEvalResult( b.state.LeaseAppliedIndex = leaseAppliedIndex } if cts := cmd.raftCmd.ClosedTimestamp; cts != nil && !cts.IsEmpty() { - if cts.Less(b.state.ClosedTimestamp) { + if cts.Less(b.state.RaftClosedTimestamp) { log.Fatalf(ctx, "closed timestamp regressing from %s to %s when applying command %x", - b.state.ClosedTimestamp, cts, cmd.idKey) + b.state.RaftClosedTimestamp, cts, cmd.idKey) } - b.state.ClosedTimestamp = *cts + b.state.RaftClosedTimestamp = *cts if clockTS, ok := cts.TryToClockTimestamp(); ok { b.maxTS.Forward(clockTS) } @@ -892,7 +892,7 @@ func (b *replicaAppBatch) ApplyToStateMachine(ctx context.Context) error { r.mu.Lock() r.mu.state.RaftAppliedIndex = b.state.RaftAppliedIndex r.mu.state.LeaseAppliedIndex = b.state.LeaseAppliedIndex - closedTimestampUpdated := r.mu.state.ClosedTimestamp.Forward(b.state.ClosedTimestamp) + closedTimestampUpdated := r.mu.state.RaftClosedTimestamp.Forward(b.state.RaftClosedTimestamp) prevStats := *r.mu.state.Stats *r.mu.state.Stats = *b.state.Stats @@ -963,7 +963,7 @@ func (b *replicaAppBatch) addAppliedStateKeyToBatch(ctx context.Context) error { // lease index along with the mvcc stats, all in one key. if err := loader.SetRangeAppliedState( ctx, b.batch, b.state.RaftAppliedIndex, b.state.LeaseAppliedIndex, - b.state.Stats, &b.state.ClosedTimestamp, + b.state.Stats, &b.state.RaftClosedTimestamp, ); err != nil { return wrapWithNonDeterministicFailure(err, "unable to set range applied state") } diff --git a/pkg/kv/kvserver/replica_follower_read.go b/pkg/kv/kvserver/replica_follower_read.go index 4bbee7dfdb28..ee7656e33afe 100644 --- a/pkg/kv/kvserver/replica_follower_read.go +++ b/pkg/kv/kvserver/replica_follower_read.go @@ -141,7 +141,7 @@ func (r *Replica) maxClosedRLocked(ctx context.Context) (_ hlc.Timestamp, ok boo lai := r.mu.state.LeaseAppliedIndex lease := *r.mu.state.Lease initialMaxClosed := r.mu.initialMaxClosed - replicaStateClosed := r.mu.state.ClosedTimestamp + replicaStateClosed := r.mu.state.RaftClosedTimestamp if lease.Expiration != nil { return hlc.Timestamp{}, false @@ -170,5 +170,5 @@ func (r *Replica) GetFrozenClosedTimestamp() hlc.Timestamp { defer r.mu.RUnlock() // TODO(andrei): Make sure that this synchronizes with the closed timestamps // side-transport once the side-transport is written. - return r.mu.state.ClosedTimestamp + return r.mu.state.RaftClosedTimestamp } diff --git a/pkg/kv/kvserver/replica_proposal.go b/pkg/kv/kvserver/replica_proposal.go index 2d3da2289028..edfee4173b8c 100644 --- a/pkg/kv/kvserver/replica_proposal.go +++ b/pkg/kv/kvserver/replica_proposal.go @@ -448,7 +448,7 @@ func (r *Replica) leasePostApplyLocked( // Inform the propBuf about the new lease so that it can initialize its closed // timestamp tracking. - r.mu.proposalBuf.OnLeaseChangeLocked(iAmTheLeaseHolder, r.mu.state.ClosedTimestamp) + r.mu.proposalBuf.OnLeaseChangeLocked(iAmTheLeaseHolder, r.mu.state.RaftClosedTimestamp) // Ordering is critical here. We only install the new lease after we've // checked for an in-progress merge and updated the timestamp cache. If the diff --git a/pkg/kv/kvserver/replica_proposal_buf.go b/pkg/kv/kvserver/replica_proposal_buf.go index f991c35f41c9..0d99ac4225ea 100644 --- a/pkg/kv/kvserver/replica_proposal_buf.go +++ b/pkg/kv/kvserver/replica_proposal_buf.go @@ -1032,7 +1032,7 @@ func (rp *replicaProposer) closeTimestampPolicy() roachpb.RangeClosedTimestampPo } func (rp *replicaProposer) raftTransportClosedTimestampEnabled() bool { - return !(*Replica)(rp).mu.state.ClosedTimestamp.IsEmpty() + return !(*Replica)(rp).mu.state.RaftClosedTimestamp.IsEmpty() } func (rp *replicaProposer) withGroupLocked(fn func(raftGroup proposerRaft) error) error { diff --git a/pkg/kv/kvserver/stateloader/stateloader.go b/pkg/kv/kvserver/stateloader/stateloader.go index a0da9c082c76..4e4060848c62 100644 --- a/pkg/kv/kvserver/stateloader/stateloader.go +++ b/pkg/kv/kvserver/stateloader/stateloader.go @@ -83,8 +83,8 @@ func (rsl StateLoader) Load( ms := as.RangeStats.ToStats() s.Stats = &ms - if as.ClosedTimestamp != nil { - s.ClosedTimestamp = *as.ClosedTimestamp + if as.RaftClosedTimestamp != nil { + s.RaftClosedTimestamp = *as.RaftClosedTimestamp } } else { if s.RaftAppliedIndex, s.LeaseAppliedIndex, err = rsl.LoadAppliedIndex(ctx, reader); err != nil { @@ -170,7 +170,7 @@ func (rsl StateLoader) Save( } } if state.UsingAppliedStateKey { - rai, lai, ct := state.RaftAppliedIndex, state.LeaseAppliedIndex, &state.ClosedTimestamp + rai, lai, ct := state.RaftAppliedIndex, state.LeaseAppliedIndex, &state.RaftClosedTimestamp if err := rsl.SetRangeAppliedState(ctx, readWriter, rai, lai, ms, ct); err != nil { return enginepb.MVCCStats{}, err } @@ -298,23 +298,24 @@ func (rsl StateLoader) LoadMVCCStats( // keys. We now deem those keys to be "legacy" because they have been replaced // by the range applied state key. // -// TODO(andrei): closedTS is a pointer to avoid an allocation when putting it in -// RangeAppliedState. RangeAppliedState.ClosedTimestamp is made non-nullable -// (see comments on the field), this argument should be taken by value. +// TODO(andrei): raftClosedTimestamp is a pointer to avoid an allocation when +// putting it in RangeAppliedState. RangeAppliedState.RaftClosedTimestamp is +// made non-nullable (see comments on the field), this argument should be taken +// by value. func (rsl StateLoader) SetRangeAppliedState( ctx context.Context, readWriter storage.ReadWriter, appliedIndex, leaseAppliedIndex uint64, newMS *enginepb.MVCCStats, - closedTS *hlc.Timestamp, + raftClosedTimestamp *hlc.Timestamp, ) error { as := enginepb.RangeAppliedState{ RaftAppliedIndex: appliedIndex, LeaseAppliedIndex: leaseAppliedIndex, RangeStats: newMS.ToPersistentStats(), } - if closedTS != nil && !closedTS.IsEmpty() { - as.ClosedTimestamp = closedTS + if raftClosedTimestamp != nil && !raftClosedTimestamp.IsEmpty() { + as.RaftClosedTimestamp = raftClosedTimestamp } // The RangeAppliedStateKey is not included in stats. This is also reflected // in C.MVCCComputeStats and ComputeStatsForRange. @@ -489,7 +490,7 @@ func (rsl StateLoader) SetMVCCStats( return err } else if as != nil { return rsl.SetRangeAppliedState( - ctx, readWriter, as.RaftAppliedIndex, as.LeaseAppliedIndex, newMS, as.ClosedTimestamp) + ctx, readWriter, as.RaftAppliedIndex, as.LeaseAppliedIndex, newMS, as.RaftClosedTimestamp) } return rsl.writeLegacyMVCCStatsInternal(ctx, readWriter, newMS) diff --git a/pkg/storage/enginepb/mvcc3.pb.go b/pkg/storage/enginepb/mvcc3.pb.go index def873b63b77..a32c9209f48f 100644 --- a/pkg/storage/enginepb/mvcc3.pb.go +++ b/pkg/storage/enginepb/mvcc3.pb.go @@ -129,7 +129,7 @@ type TxnMeta struct { func (m *TxnMeta) Reset() { *m = TxnMeta{} } func (*TxnMeta) ProtoMessage() {} func (*TxnMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{0} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{0} } func (m *TxnMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -165,7 +165,7 @@ func (m *IgnoredSeqNumRange) Reset() { *m = IgnoredSeqNumRange{} } func (m *IgnoredSeqNumRange) String() string { return proto.CompactTextString(m) } func (*IgnoredSeqNumRange) ProtoMessage() {} func (*IgnoredSeqNumRange) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{1} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{1} } func (m *IgnoredSeqNumRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +216,7 @@ func (m *MVCCStatsDelta) Reset() { *m = MVCCStatsDelta{} } func (m *MVCCStatsDelta) String() string { return proto.CompactTextString(m) } func (*MVCCStatsDelta) ProtoMessage() {} func (*MVCCStatsDelta) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{2} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{2} } func (m *MVCCStatsDelta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -268,7 +268,7 @@ func (m *MVCCPersistentStats) Reset() { *m = MVCCPersistentStats{} } func (m *MVCCPersistentStats) String() string { return proto.CompactTextString(m) } func (*MVCCPersistentStats) ProtoMessage() {} func (*MVCCPersistentStats) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{3} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{3} } func (m *MVCCPersistentStats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -307,25 +307,26 @@ type RangeAppliedState struct { // range_stats is the set of mvcc stats that accounts for the current value // of the Raft state machine. RangeStats MVCCPersistentStats `protobuf:"bytes,3,opt,name=range_stats,json=rangeStats,proto3" json:"range_stats"` - // closed_timestamp is the largest timestamp that is known to have been closed - // as of this lease applied index. This means that the current leaseholder (if - // any) and any future leaseholder will not evaluate writes at or below this - // timestamp, and also that any in-flight commands that can still apply are - // writing at higher timestamps. Non-leaseholder replicas are free to serve - // "follower reads" at or below this timestamp. + // raft_closed_timestamp is the largest timestamp that is known to have been + // closed through Raft commands as of this lease applied index. This means + // that the current leaseholder (if any) and any future leaseholder will not + // evaluate writes at or below this timestamp, and also that any in-flight + // commands that can still apply are writing at higher timestamps. + // Non-leaseholder replicas are free to serve "follower reads" at or below + // this timestamp. // // TODO(andrei): Make this field not-nullable in 21.2, once all the ranges // have a closed timestamp applied to their state (this might need a // migration). In 21.1 we cannot write empty timestamp to disk because that // looks like an inconsistency to the consistency-checker. - ClosedTimestamp *hlc.Timestamp `protobuf:"bytes,4,opt,name=closed_timestamp,json=closedTimestamp,proto3" json:"closed_timestamp,omitempty"` + RaftClosedTimestamp *hlc.Timestamp `protobuf:"bytes,4,opt,name=raft_closed_timestamp,json=raftClosedTimestamp,proto3" json:"raft_closed_timestamp,omitempty"` } func (m *RangeAppliedState) Reset() { *m = RangeAppliedState{} } func (m *RangeAppliedState) String() string { return proto.CompactTextString(m) } func (*RangeAppliedState) ProtoMessage() {} func (*RangeAppliedState) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{4} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{4} } func (m *RangeAppliedState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -363,7 +364,7 @@ func (m *MVCCWriteValueOp) Reset() { *m = MVCCWriteValueOp{} } func (m *MVCCWriteValueOp) String() string { return proto.CompactTextString(m) } func (*MVCCWriteValueOp) ProtoMessage() {} func (*MVCCWriteValueOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{5} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{5} } func (m *MVCCWriteValueOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,7 +402,7 @@ func (m *MVCCWriteIntentOp) Reset() { *m = MVCCWriteIntentOp{} } func (m *MVCCWriteIntentOp) String() string { return proto.CompactTextString(m) } func (*MVCCWriteIntentOp) ProtoMessage() {} func (*MVCCWriteIntentOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{6} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{6} } func (m *MVCCWriteIntentOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +438,7 @@ func (m *MVCCUpdateIntentOp) Reset() { *m = MVCCUpdateIntentOp{} } func (m *MVCCUpdateIntentOp) String() string { return proto.CompactTextString(m) } func (*MVCCUpdateIntentOp) ProtoMessage() {} func (*MVCCUpdateIntentOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{7} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{7} } func (m *MVCCUpdateIntentOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -476,7 +477,7 @@ func (m *MVCCCommitIntentOp) Reset() { *m = MVCCCommitIntentOp{} } func (m *MVCCCommitIntentOp) String() string { return proto.CompactTextString(m) } func (*MVCCCommitIntentOp) ProtoMessage() {} func (*MVCCCommitIntentOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{8} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{8} } func (m *MVCCCommitIntentOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -516,7 +517,7 @@ func (m *MVCCAbortIntentOp) Reset() { *m = MVCCAbortIntentOp{} } func (m *MVCCAbortIntentOp) String() string { return proto.CompactTextString(m) } func (*MVCCAbortIntentOp) ProtoMessage() {} func (*MVCCAbortIntentOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{9} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{9} } func (m *MVCCAbortIntentOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -552,7 +553,7 @@ func (m *MVCCAbortTxnOp) Reset() { *m = MVCCAbortTxnOp{} } func (m *MVCCAbortTxnOp) String() string { return proto.CompactTextString(m) } func (*MVCCAbortTxnOp) ProtoMessage() {} func (*MVCCAbortTxnOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{10} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{10} } func (m *MVCCAbortTxnOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -591,7 +592,7 @@ func (m *MVCCLogicalOp) Reset() { *m = MVCCLogicalOp{} } func (m *MVCCLogicalOp) String() string { return proto.CompactTextString(m) } func (*MVCCLogicalOp) ProtoMessage() {} func (*MVCCLogicalOp) Descriptor() ([]byte, []int) { - return fileDescriptor_mvcc3_ed774bd3b5c68109, []int{11} + return fileDescriptor_mvcc3_b753d4f32a287aab, []int{11} } func (m *MVCCLogicalOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -823,7 +824,7 @@ func (this *RangeAppliedState) Equal(that interface{}) bool { if !this.RangeStats.Equal(&that1.RangeStats) { return false } - if !this.ClosedTimestamp.Equal(that1.ClosedTimestamp) { + if !this.RaftClosedTimestamp.Equal(that1.RaftClosedTimestamp) { return false } return true @@ -1158,11 +1159,11 @@ func (m *RangeAppliedState) MarshalTo(dAtA []byte) (int, error) { return 0, err } i += n4 - if m.ClosedTimestamp != nil { + if m.RaftClosedTimestamp != nil { dAtA[i] = 0x22 i++ - i = encodeVarintMvcc3(dAtA, i, uint64(m.ClosedTimestamp.Size())) - n5, err := m.ClosedTimestamp.MarshalTo(dAtA[i:]) + i = encodeVarintMvcc3(dAtA, i, uint64(m.RaftClosedTimestamp.Size())) + n5, err := m.RaftClosedTimestamp.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1611,7 +1612,7 @@ func NewPopulatedRangeAppliedState(r randyMvcc3, easy bool) *RangeAppliedState { v5 := NewPopulatedMVCCPersistentStats(r, easy) this.RangeStats = *v5 if r.Intn(10) != 0 { - this.ClosedTimestamp = hlc.NewPopulatedTimestamp(r, easy) + this.RaftClosedTimestamp = hlc.NewPopulatedTimestamp(r, easy) } if !easy && r.Intn(10) != 0 { } @@ -1861,8 +1862,8 @@ func (m *RangeAppliedState) Size() (n int) { } l = m.RangeStats.Size() n += 1 + l + sovMvcc3(uint64(l)) - if m.ClosedTimestamp != nil { - l = m.ClosedTimestamp.Size() + if m.RaftClosedTimestamp != nil { + l = m.RaftClosedTimestamp.Size() n += 1 + l + sovMvcc3(uint64(l)) } return n @@ -3150,7 +3151,7 @@ func (m *RangeAppliedState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClosedTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RaftClosedTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3174,10 +3175,10 @@ func (m *RangeAppliedState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ClosedTimestamp == nil { - m.ClosedTimestamp = &hlc.Timestamp{} + if m.RaftClosedTimestamp == nil { + m.RaftClosedTimestamp = &hlc.Timestamp{} } - if err := m.ClosedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RaftClosedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4373,87 +4374,87 @@ var ( ) func init() { - proto.RegisterFile("storage/enginepb/mvcc3.proto", fileDescriptor_mvcc3_ed774bd3b5c68109) + proto.RegisterFile("storage/enginepb/mvcc3.proto", fileDescriptor_mvcc3_b753d4f32a287aab) } -var fileDescriptor_mvcc3_ed774bd3b5c68109 = []byte{ - // 1236 bytes of a gzipped FileDescriptorProto +var fileDescriptor_mvcc3_b753d4f32a287aab = []byte{ + // 1245 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x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, 0xc7, 0xd3, 0x8a, 0xf4, 0x5c, - 0x51, 0xd3, 0x45, 0xf9, 0xb9, 0xa2, 0xaa, 0xc5, 0x6c, 0xf5, 0x4b, 0x00, 0x9b, 0x36, 0xf1, 0x02, - 0x6c, 0xed, 0xe3, 0x93, 0x97, 0xdd, 0x8e, 0x8e, 0x88, 0x8d, 0xe1, 0x2a, 0xc8, 0x84, 0x14, 0x05, - 0x94, 0xff, 0x48, 0xd3, 0xa5, 0x09, 0x00, 0xde, 0x07, 0x32, 0x26, 0x56, 0x29, 0xfd, 0x27, 0x9c, - 0x99, 0x37, 0x55, 0x96, 0xe7, 0xf7, 0xd3, 0x8a, 0x54, 0xfd, 0x49, 0x01, 0xcb, 0x3b, 0x87, 0x5b, - 0x5b, 0xfb, 0x14, 0xd1, 0x70, 0x1b, 0xbb, 0x14, 0xc1, 0x87, 0x60, 0xc5, 0x45, 0x21, 0x35, 0xba, - 0xbe, 0x85, 0x28, 0x36, 0x08, 0x22, 0x5e, 0xc8, 0x13, 0x15, 0xf5, 0x02, 0x03, 0x0e, 0xb8, 0xfd, - 0x25, 0x33, 0xc3, 0x07, 0x00, 0x38, 0x84, 0x62, 0x42, 0x0d, 0x64, 0x63, 0x9e, 0xad, 0xa8, 0x67, - 0x85, 0xa5, 0x6e, 0x63, 0xf8, 0x11, 0xc8, 0xdb, 0xa6, 0xd1, 0xee, 0x53, 0x1c, 0x72, 0x07, 0xf6, - 0xfb, 0x17, 0x1b, 0xcb, 0xc3, 0x41, 0x05, 0x3c, 0xdd, 0x6a, 0x30, 0x73, 0xdd, 0xc6, 0x3a, 0xb0, - 0xcd, 0xd1, 0x9a, 0x11, 0xba, 0x4e, 0x0f, 0x8b, 0x18, 0xae, 0x0d, 0xa8, 0x67, 0x99, 0x85, 0x7b, - 0x24, 0xb0, 0xe9, 0x75, 0x09, 0xe5, 0x62, 0x88, 0xe1, 0x2d, 0x66, 0x80, 0xef, 0x81, 0xec, 0x31, - 0xee, 0xc7, 0xc1,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 0x87, 0x1a, 0xb8, 0xe3, 0x62, 0x14, 0xe2, 0x4b, 0xee, 0x49, 0xee, 0x9e, 0xe7, + 0xd0, 0x94, 0xff, 0x21, 0xc8, 0x04, 0x2c, 0xa5, 0x11, 0x32, 0x29, 0x73, 0xbd, 0x65, 0x36, 0x2a, + 0xda, 0xd5, 0x43, 0x58, 0xfb, 0x8b, 0x2f, 0x20, 0xba, 0xfa, 0x01, 0x67, 0x12, 0xdf, 0xc4, 0x0b, + 0xf0, 0x16, 0xaf, 0xda, 0x74, 0xbd, 0x10, 0x5b, 0x13, 0xa3, 0x44, 0x99, 0x63, 0x94, 0xe8, 0x77, + 0x58, 0x6c, 0x9d, 0x87, 0x4e, 0xcc, 0x92, 0xb8, 0x51, 0xdf, 0x4a, 0x20, 0xc7, 0xca, 0xf8, 0x94, + 0xcd, 0xc2, 0x43, 0xe4, 0x76, 0xf0, 0xae, 0x3f, 0x9a, 0xc6, 0xd2, 0x78, 0x1a, 0x57, 0x41, 0x7a, + 0x9c, 0x37, 0x39, 0xff, 0x08, 0x1b, 0x47, 0xc1, 0xbb, 0x20, 0xd5, 0x65, 0xfc, 0xd1, 0x90, 0x17, + 0x1b, 0xf6, 0x51, 0xf9, 0x01, 0xee, 0x1a, 0x02, 0x52, 0x38, 0x94, 0x66, 0x16, 0x5e, 0x4b, 0xf9, + 0xbb, 0x24, 0xc8, 0xc7, 0xe5, 0x89, 0x9f, 0x7a, 0xd7, 0x87, 0x9f, 0x83, 0x05, 0xda, 0x23, 0x46, + 0xfc, 0x08, 0xd9, 0xbe, 0xd9, 0x23, 0x24, 0xd5, 0xec, 0x91, 0xc6, 0xb6, 0x9e, 0xa2, 0x3d, 0xd2, + 0xb0, 0xe0, 0x3b, 0x60, 0x91, 0x91, 0xb3, 0x06, 0x24, 0x79, 0x39, 0x2c, 0xd7, 0x27, 0x97, 0x7b, + 0x20, 0xff, 0xa3, 0x1e, 0xec, 0x82, 0x3c, 0xe3, 0x9e, 0x7e, 0x11, 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, 0xc2, 0x5f, 0x2e, 0x99, 0x8d, 0xf5, 0xb9, 0xe8, 0xb8, 0x94, 0x74, 0x15, 0x45, 0xeb, + 0x2d, 0xe5, 0xec, 0xb4, 0x24, 0xd5, 0xd6, 0xcf, 0x7e, 0x2b, 0x26, 0xce, 0x86, 0x45, 0xe9, 0xd5, + 0xb0, 0x28, 0xbd, 0x1e, 0x16, 0xa5, 0x5f, 0x87, 0x45, 0xe9, 0xab, 0xf3, 0x62, 0xe2, 0xd5, 0x79, + 0x31, 0xf1, 0xfa, 0xbc, 0x98, 0xf8, 0x4c, 0x1d, 0x51, 0xb5, 0x16, 0xf8, 0xbf, 0xcb, 0xcd, 0x3f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x35, 0x77, 0x95, 0x16, 0xc9, 0x0e, 0x00, 0x00, } diff --git a/pkg/storage/enginepb/mvcc3.proto b/pkg/storage/enginepb/mvcc3.proto index 66181e1e064f..c00db32010ce 100644 --- a/pkg/storage/enginepb/mvcc3.proto +++ b/pkg/storage/enginepb/mvcc3.proto @@ -204,18 +204,19 @@ message RangeAppliedState { // of the Raft state machine. MVCCPersistentStats range_stats = 3 [(gogoproto.nullable) = false]; - // closed_timestamp is the largest timestamp that is known to have been closed - // as of this lease applied index. This means that the current leaseholder (if - // any) and any future leaseholder will not evaluate writes at or below this - // timestamp, and also that any in-flight commands that can still apply are - // writing at higher timestamps. Non-leaseholder replicas are free to serve - // "follower reads" at or below this timestamp. + // raft_closed_timestamp is the largest timestamp that is known to have been + // closed through Raft commands as of this lease applied index. This means + // that the current leaseholder (if any) and any future leaseholder will not + // evaluate writes at or below this timestamp, and also that any in-flight + // commands that can still apply are writing at higher timestamps. + // Non-leaseholder replicas are free to serve "follower reads" at or below + // this timestamp. // // TODO(andrei): Make this field not-nullable in 21.2, once all the ranges // have a closed timestamp applied to their state (this might need a // migration). In 21.1 we cannot write empty timestamp to disk because that // looks like an inconsistency to the consistency-checker. - util.hlc.Timestamp closed_timestamp = 4; + util.hlc.Timestamp raft_closed_timestamp = 4; } // MVCCWriteValueOp corresponds to a value being written outside of a