diff --git a/pkg/roachpb/api.pb.go b/pkg/roachpb/api.pb.go index 7acfd5b8e06d..8004790c7612 100644 --- a/pkg/roachpb/api.pb.go +++ b/pkg/roachpb/api.pb.go @@ -142,6 +142,7 @@ HandledRetryableTxnError UntrackedTxnError TxnPrevAttemptError + IntegerOverflowError ErrorDetail ErrPosition Error diff --git a/pkg/roachpb/errors.go b/pkg/roachpb/errors.go index 9d5dbb2d8c26..f25d0c5abbbc 100644 --- a/pkg/roachpb/errors.go +++ b/pkg/roachpb/errors.go @@ -618,3 +618,13 @@ func (*TxnPrevAttemptError) message(_ *Error) string { } var _ ErrorDetailInterface = &TxnPrevAttemptError{} + +func (e *IntegerOverflowError) Error() string { + return e.message(nil) +} + +func (e *IntegerOverflowError) message(_ *Error) string { + return fmt.Sprintf( + "key %s with value %d incremented by %d results in overflow", + e.Key, e.CurrentValue, e.IncrementValue) +} diff --git a/pkg/roachpb/errors.pb.go b/pkg/roachpb/errors.pb.go index b029520145e9..dfb407a8a474 100644 --- a/pkg/roachpb/errors.pb.go +++ b/pkg/roachpb/errors.pb.go @@ -483,6 +483,19 @@ func (m *TxnPrevAttemptError) String() string { return proto.CompactT func (*TxnPrevAttemptError) ProtoMessage() {} func (*TxnPrevAttemptError) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{24} } +// An IntegerOverflowError indicates that an operation was aborted because +// it would have caused an integeter overflow. +type IntegerOverflowError struct { + Key Key `protobuf:"bytes,1,opt,name=key,casttype=Key" json:"key,omitempty"` + CurrentValue int64 `protobuf:"varint,2,opt,name=current_value,json=currentValue" json:"current_value"` + IncrementValue int64 `protobuf:"varint,3,opt,name=increment_value,json=incrementValue" json:"increment_value"` +} + +func (m *IntegerOverflowError) Reset() { *m = IntegerOverflowError{} } +func (m *IntegerOverflowError) String() string { return proto.CompactTextString(m) } +func (*IntegerOverflowError) ProtoMessage() {} +func (*IntegerOverflowError) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{25} } + // ErrorDetail is a union type containing all available errors. type ErrorDetail struct { NotLeaseHolder *NotLeaseHolderError `protobuf:"bytes,1,opt,name=not_lease_holder,json=notLeaseHolder" json:"not_lease_holder,omitempty"` @@ -514,12 +527,13 @@ type ErrorDetail struct { HandledRetryableTxnError *HandledRetryableTxnError `protobuf:"bytes,28,opt,name=handled_retryable_txn_error,json=handledRetryableTxnError" json:"handled_retryable_txn_error,omitempty"` UntrackedTxnError *UntrackedTxnError `protobuf:"bytes,29,opt,name=untracked_txn_error,json=untrackedTxnError" json:"untracked_txn_error,omitempty"` TxnAbortedAsyncErr *TxnPrevAttemptError `protobuf:"bytes,30,opt,name=txn_aborted_async_err,json=txnAbortedAsyncErr" json:"txn_aborted_async_err,omitempty"` + IntegerOverflow *IntegerOverflowError `protobuf:"bytes,31,opt,name=integer_overflow,json=integerOverflow" json:"integer_overflow,omitempty"` } func (m *ErrorDetail) Reset() { *m = ErrorDetail{} } func (m *ErrorDetail) String() string { return proto.CompactTextString(m) } func (*ErrorDetail) ProtoMessage() {} -func (*ErrorDetail) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{25} } +func (*ErrorDetail) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{26} } // ErrPosition describes the position of an error in a Batch. A simple nullable // primitive field would break compatibility with proto3, where primitive fields @@ -531,7 +545,7 @@ type ErrPosition struct { func (m *ErrPosition) Reset() { *m = ErrPosition{} } func (m *ErrPosition) String() string { return proto.CompactTextString(m) } func (*ErrPosition) ProtoMessage() {} -func (*ErrPosition) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{26} } +func (*ErrPosition) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{27} } // Error is a generic representation including a string message // and information about retryability. @@ -561,7 +575,7 @@ type Error struct { func (m *Error) Reset() { *m = Error{} } func (*Error) ProtoMessage() {} -func (*Error) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{27} } +func (*Error) Descriptor() ([]byte, []int) { return fileDescriptorErrors, []int{28} } func init() { proto.RegisterType((*NotLeaseHolderError)(nil), "cockroach.roachpb.NotLeaseHolderError") @@ -589,6 +603,7 @@ func init() { proto.RegisterType((*HandledRetryableTxnError)(nil), "cockroach.roachpb.HandledRetryableTxnError") proto.RegisterType((*UntrackedTxnError)(nil), "cockroach.roachpb.UntrackedTxnError") proto.RegisterType((*TxnPrevAttemptError)(nil), "cockroach.roachpb.TxnPrevAttemptError") + proto.RegisterType((*IntegerOverflowError)(nil), "cockroach.roachpb.IntegerOverflowError") proto.RegisterType((*ErrorDetail)(nil), "cockroach.roachpb.ErrorDetail") proto.RegisterType((*ErrPosition)(nil), "cockroach.roachpb.ErrPosition") proto.RegisterType((*Error)(nil), "cockroach.roachpb.Error") @@ -1344,6 +1359,42 @@ func (this *TxnPrevAttemptError) Equal(that interface{}) bool { } return true } +func (this *IntegerOverflowError) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IntegerOverflowError) + if !ok { + that2, ok := that.(IntegerOverflowError) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.Key, that1.Key) { + return false + } + if this.CurrentValue != that1.CurrentValue { + return false + } + if this.IncrementValue != that1.IncrementValue { + return false + } + return true +} func (this *ErrorDetail) Equal(that interface{}) bool { if that == nil { if this == nil { @@ -1441,6 +1492,9 @@ func (this *ErrorDetail) Equal(that interface{}) bool { if !this.TxnAbortedAsyncErr.Equal(that1.TxnAbortedAsyncErr) { return false } + if !this.IntegerOverflow.Equal(that1.IntegerOverflow) { + return false + } return true } func (this *ErrPosition) Equal(that interface{}) bool { @@ -2194,6 +2248,36 @@ func (m *TxnPrevAttemptError) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *IntegerOverflowError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IntegerOverflowError) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintErrors(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintErrors(dAtA, i, uint64(m.CurrentValue)) + dAtA[i] = 0x18 + i++ + i = encodeVarintErrors(dAtA, i, uint64(m.IncrementValue)) + return i, nil +} + func (m *ErrorDetail) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2467,6 +2551,18 @@ func (m *ErrorDetail) MarshalTo(dAtA []byte) (int, error) { } i += n41 } + if m.IntegerOverflow != nil { + dAtA[i] = 0xfa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintErrors(dAtA, i, uint64(m.IntegerOverflow.Size())) + n42, err := m.IntegerOverflow.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + } return i, nil } @@ -2517,11 +2613,11 @@ func (m *Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintErrors(dAtA, i, uint64(m.UnexposedTxn.Size())) - n42, err := m.UnexposedTxn.MarshalTo(dAtA[i:]) + n43, err := m.UnexposedTxn.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n42 + i += n43 } dAtA[i] = 0x28 i++ @@ -2530,30 +2626,30 @@ func (m *Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintErrors(dAtA, i, uint64(m.Detail.Size())) - n43, err := m.Detail.MarshalTo(dAtA[i:]) + n44, err := m.Detail.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n43 + i += n44 } if m.Index != nil { dAtA[i] = 0x3a i++ i = encodeVarintErrors(dAtA, i, uint64(m.Index.Size())) - n44, err := m.Index.MarshalTo(dAtA[i:]) + n45, err := m.Index.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n44 + i += n45 } dAtA[i] = 0x42 i++ i = encodeVarintErrors(dAtA, i, uint64(m.Now.Size())) - n45, err := m.Now.MarshalTo(dAtA[i:]) + n46, err := m.Now.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n45 + i += n46 return i, nil } @@ -2796,6 +2892,18 @@ func (m *TxnPrevAttemptError) Size() (n int) { return n } +func (m *IntegerOverflowError) Size() (n int) { + var l int + _ = l + if m.Key != nil { + l = len(m.Key) + n += 1 + l + sovErrors(uint64(l)) + } + n += 1 + sovErrors(uint64(m.CurrentValue)) + n += 1 + sovErrors(uint64(m.IncrementValue)) + return n +} + func (m *ErrorDetail) Size() (n int) { var l int _ = l @@ -2895,6 +3003,10 @@ func (m *ErrorDetail) Size() (n int) { l = m.TxnAbortedAsyncErr.Size() n += 2 + l + sovErrors(uint64(l)) } + if m.IntegerOverflow != nil { + l = m.IntegerOverflow.Size() + n += 2 + l + sovErrors(uint64(l)) + } return n } @@ -3015,6 +3127,9 @@ func (this *ErrorDetail) GetValue() interface{} { if this.TxnAbortedAsyncErr != nil { return this.TxnAbortedAsyncErr } + if this.IntegerOverflow != nil { + return this.IntegerOverflow + } return nil } @@ -3068,6 +3183,8 @@ func (this *ErrorDetail) SetValue(value interface{}) bool { this.UntrackedTxnError = vt case *TxnPrevAttemptError: this.TxnAbortedAsyncErr = vt + case *IntegerOverflowError: + this.IntegerOverflow = vt default: return false } @@ -5262,6 +5379,125 @@ func (m *TxnPrevAttemptError) Unmarshal(dAtA []byte) error { } return nil } +func (m *IntegerOverflowError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErrors + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IntegerOverflowError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntegerOverflowError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErrors + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthErrors + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) + } + m.CurrentValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErrors + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentValue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncrementValue", wireType) + } + m.IncrementValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErrors + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IncrementValue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipErrors(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthErrors + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ErrorDetail) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6083,6 +6319,39 @@ func (m *ErrorDetail) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 31: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IntegerOverflow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowErrors + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthErrors + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IntegerOverflow == nil { + m.IntegerOverflow = &IntegerOverflowError{} + } + if err := m.IntegerOverflow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipErrors(dAtA[iNdEx:]) @@ -6527,133 +6796,138 @@ var ( func init() { proto.RegisterFile("roachpb/errors.proto", fileDescriptorErrors) } var fileDescriptorErrors = []byte{ - // 2033 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x37, 0x6d, 0x39, 0xb2, 0x9e, 0x2c, 0x4b, 0x9e, 0x38, 0x0e, 0xe3, 0x24, 0x52, 0xd6, 0xdb, - 0x8f, 0x34, 0x05, 0xac, 0xc2, 0xdb, 0x6c, 0xb1, 0x69, 0x7b, 0x90, 0x23, 0xd9, 0xab, 0xb5, 0x2d, - 0xb9, 0x63, 0x79, 0x53, 0xef, 0x16, 0x20, 0x68, 0x72, 0x2c, 0x71, 0x4d, 0x91, 0xda, 0xe1, 0x30, - 0x96, 0x2f, 0x3d, 0xf7, 0xd8, 0x63, 0x81, 0x16, 0x68, 0x80, 0x1e, 0x7b, 0xe9, 0xa1, 0xe8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, 0xaa, 0x6d, 0x89, 0x6d, 0x08, 0xdf, - 0x44, 0x28, 0xb2, 0xdb, 0x9b, 0x49, 0xf1, 0xe4, 0xeb, 0xb1, 0x68, 0xe6, 0x87, 0xb6, 0x62, 0x09, - 0xed, 0x43, 0x3e, 0x08, 0xdb, 0x6d, 0x12, 0xb0, 0x01, 0x5a, 0x6a, 0x66, 0xb4, 0x95, 0x81, 0xa9, - 0x58, 0x51, 0x37, 0xf4, 0x77, 0x0d, 0x36, 0x31, 0x31, 0xed, 0x57, 0x0e, 0xeb, 0x38, 0xde, 0x89, - 0x67, 0x11, 0xca, 0x4c, 0xc7, 0x63, 0x57, 0x75, 0x8f, 0x11, 0xfa, 0xda, 0x74, 0xe5, 0x75, 0x7d, - 0x06, 0x2b, 0x94, 0x98, 0xb6, 0x31, 0x28, 0x10, 0x95, 0xe1, 0x8f, 0x63, 0x1b, 0xf3, 0x2a, 0xda, - 0xea, 0xb8, 0xd6, 0x56, 0x2b, 0x52, 0x52, 0x79, 0x90, 0xe3, 0xa6, 0x03, 0x21, 0xc2, 0x80, 0x48, - 0xdf, 0x09, 0x98, 0xe3, 0xb5, 0x63, 0x78, 0xf3, 0xb3, 0xe3, 0xad, 0x46, 0xe6, 0x83, 0x05, 0x75, - 0x98, 0x12, 0xdc, 0x6f, 0x51, 0xd3, 0x0b, 0x4c, 0x8b, 0x39, 0xbe, 0x57, 0x39, 0xf3, 0x29, 0x23, - 0x76, 0x3c, 0xc5, 0x4c, 0x58, 0x8b, 0x29, 0x1c, 0x85, 0x81, 0xca, 0x86, 0x97, 0x00, 0xbd, 0x30, - 0xe8, 0x10, 0x62, 0xb0, 0xbe, 0xa7, 0x8e, 0x56, 0x4c, 0xb8, 0xd3, 0x98, 0x71, 0x94, 0xe3, 0xd2, - 0xae, 0xd5, 0xf7, 0xd4, 0x16, 0xe7, 0x70, 0x2f, 0xa6, 0x85, 0x09, 0xa3, 0x57, 0x72, 0x8f, 0x3d, - 0xb8, 0x43, 0x89, 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x5e, 0xad, 0x30, 0x3f, 0x94, 0x1f, 0xd7, 0x70, 0xbd, 0x72, 0x50, 0xff, 0xa2, 0xb2, 0x73, 0x50, - 0x2b, 0x2c, 0xa0, 0x07, 0x70, 0x4f, 0xca, 0x8f, 0x9a, 0xc7, 0xc7, 0xf5, 0x9d, 0x83, 0x9a, 0x81, - 0x6b, 0x47, 0x07, 0x95, 0xd3, 0x42, 0x6a, 0x23, 0xf5, 0x9b, 0x3f, 0x15, 0xe7, 0x9e, 0xbd, 0x00, - 0x34, 0x19, 0x79, 0xb4, 0x04, 0xa9, 0x46, 0xb3, 0x51, 0x2b, 0xcc, 0xa1, 0x2c, 0xa4, 0x77, 0x2a, - 0x2f, 0xf7, 0x9b, 0xbb, 0xbb, 0x05, 0x0d, 0xe5, 0x20, 0x53, 0x3f, 0x3c, 0xac, 0x55, 0xeb, 0x95, - 0x56, 0xad, 0x30, 0xbf, 0xf3, 0xc1, 0xdb, 0xff, 0x16, 0xe7, 0xde, 0xde, 0x14, 0xb5, 0x7f, 0xdc, - 0x14, 0xb5, 0x7f, 0xde, 0x14, 0xb5, 0xff, 0xdc, 0x14, 0xb5, 0xdf, 0xfe, 0xaf, 0x38, 0xf7, 0x45, - 0x5a, 0xdd, 0xeb, 0x37, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xb3, 0x7e, 0xb0, 0xe6, 0x15, 0x00, - 0x00, + // 2118 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xcd, 0x73, 0x1b, 0x49, + 0x15, 0xf7, 0x58, 0x72, 0x64, 0x3d, 0x59, 0x96, 0xdc, 0x71, 0xbc, 0x13, 0x27, 0x91, 0xb2, 0x5e, + 0x3e, 0xb2, 0xa1, 0xb0, 0x28, 0x2f, 0x59, 0x6a, 0x03, 0x1c, 0xe4, 0x48, 0xce, 0x6a, 0x6d, 0x4b, + 0xa6, 0x2d, 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, 0x72, 0x89, 0x0b, 0xca, + 0xe2, 0x98, 0x1b, 0xec, 0x93, 0x4b, 0x54, 0x81, 0x48, 0x64, 0x10, 0xcf, 0x16, 0x2e, 0x8b, 0xe3, + 0x2e, 0x79, 0xa5, 0xaf, 0x7b, 0x36, 0x77, 0x38, 0x84, 0x62, 0x4f, 0x2d, 0x4b, 0x6c, 0x43, 0xc4, + 0x26, 0x52, 0x91, 0xdb, 0xd9, 0x4a, 0xca, 0x27, 0xd7, 0xc7, 0xb2, 0x59, 0x18, 0xf9, 0x0a, 0x15, + 0xda, 0x87, 0x42, 0x10, 0x76, 0x3a, 0x24, 0x60, 0x43, 0xb4, 0xf4, 0xdc, 0x68, 0xab, 0x43, 0x57, + 0xa1, 0x51, 0x27, 0xf4, 0x57, 0x0d, 0xb6, 0x30, 0x31, 0xed, 0x17, 0x0e, 0xeb, 0x3a, 0xde, 0x89, + 0x67, 0x11, 0xca, 0x4c, 0xc7, 0x63, 0x97, 0x0d, 0x8f, 0x11, 0x7a, 0x6e, 0xba, 0xf2, 0xb8, 0x3e, + 0x83, 0x55, 0x4a, 0x4c, 0xdb, 0x18, 0x5e, 0x10, 0x55, 0xe1, 0x0f, 0x62, 0x0b, 0xf3, 0x5b, 0xb4, + 0xdd, 0x75, 0xad, 0xed, 0x76, 0x64, 0xa4, 0xea, 0x20, 0xcf, 0x5d, 0x87, 0x42, 0x84, 0x01, 0x91, + 0x81, 0x13, 0x30, 0xc7, 0xeb, 0xc4, 0xf0, 0x16, 0xe7, 0xc7, 0x5b, 0x8b, 0xdc, 0x87, 0x0a, 0xb5, + 0x99, 0x32, 0xbc, 0xd7, 0xa6, 0xa6, 0x17, 0x98, 0x16, 0x73, 0x7c, 0xaf, 0x7a, 0xea, 0x53, 0x46, + 0xec, 0x78, 0x89, 0x99, 0xb0, 0x1e, 0x33, 0x38, 0x0a, 0x03, 0x55, 0x0d, 0xcf, 0x00, 0xfa, 0x61, + 0xd0, 0x25, 0xc4, 0x60, 0x03, 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xed, 0xb7, 0xf6, 0xf6, 0x8a, 0x1a, 0xca, 0x43, 0xb6, 0x71, + 0x78, 0x58, 0xaf, 0x35, 0xaa, 0xed, 0x7a, 0x71, 0x71, 0xf7, 0xfd, 0x37, 0xff, 0x2e, 0x2d, 0xbc, + 0xb9, 0x2e, 0x69, 0x7f, 0xbb, 0x2e, 0x69, 0x7f, 0xbf, 0x2e, 0x69, 0xff, 0xba, 0x2e, 0x69, 0xbf, + 0xfe, 0x4f, 0x69, 0xe1, 0x8b, 0x8c, 0x3a, 0xd7, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x61, + 0x4e, 0xc6, 0xce, 0x16, 0x00, 0x00, } diff --git a/pkg/roachpb/errors.proto b/pkg/roachpb/errors.proto index 39aebe78a27d..eebb40fec423 100644 --- a/pkg/roachpb/errors.proto +++ b/pkg/roachpb/errors.proto @@ -334,6 +334,16 @@ message TxnPrevAttemptError { option (gogoproto.equal) = true; } +// An IntegerOverflowError indicates that an operation was aborted because +// it would have caused an integeter overflow. +message IntegerOverflowError { + option (gogoproto.equal) = true; + + optional bytes key = 1 [(gogoproto.casttype) = "Key"]; + optional int64 current_value = 2 [(gogoproto.nullable) = false]; + optional int64 increment_value = 3 [(gogoproto.nullable) = false]; +} + // ErrorDetail is a union type containing all available errors. message ErrorDetail { option (gogoproto.equal) = true; @@ -369,6 +379,7 @@ message ErrorDetail { optional HandledRetryableTxnError handled_retryable_txn_error = 28; optional UntrackedTxnError untracked_txn_error = 29; optional TxnPrevAttemptError txn_aborted_async_err = 30; + optional IntegerOverflowError integer_overflow = 31; } // TransactionRestart indicates how an error should be handled in a diff --git a/pkg/sql/logictest/testdata/logic_test/sequences b/pkg/sql/logictest/testdata/logic_test/sequences index 25551b85ba8c..951e193f250c 100644 --- a/pkg/sql/logictest/testdata/logic_test/sequences +++ b/pkg/sql/logictest/testdata/logic_test/sequences @@ -107,7 +107,7 @@ query ITITTTT colnames SELECT * FROM crdb_internal.create_statements WHERE descriptor_name = 'show_create_test' ---- database_id database_name descriptor_id descriptor_type descriptor_name create_statement state -50 test 58 sequence show_create_test CREATE SEQUENCE show_create_test MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 1 PUBLIC +50 test 59 sequence show_create_test CREATE SEQUENCE show_create_test MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 1 PUBLIC query TT colnames SHOW CREATE SEQUENCE show_create_test @@ -358,12 +358,6 @@ SELECT nextval('nonexistent_seq') # BEHAVIOR UPON HITTING LIMITS (minvalue, maxvalue) -statement error pgcode 22023 START value \(11\) cannot be greater than MAXVALUE \(10\) -CREATE SEQUENCE limit_test MAXVALUE 10 START WITH 11 - -statement error pgcode 22023 START value \(5\) cannot be less than MINVALUE \(10\) -CREATE SEQUENCE limit_test MINVALUE 10 START WITH 5 - statement ok CREATE SEQUENCE limit_test MAXVALUE 10 START WITH 9 @@ -396,6 +390,30 @@ SELECT nextval('downward_limit_test') statement error pgcode 2200H pq: nextval\(\): reached minimum value of sequence "downward_limit_test" \(-10\) SELECT nextval('downward_limit_test') +# Verify that it still works with integer overflows and underflows. + +statement ok +CREATE SEQUENCE overflow_test START WITH 9223372036854775807 + +query I +SELECT nextval('overflow_test') +---- +9223372036854775807 + +statement error pgcode 2200H pq: nextval\(\): reached maximum value of sequence "overflow_test" \(9223372036854775807\) +SELECT nextval('overflow_test') + +statement ok +CREATE SEQUENCE underflow_test MINVALUE -9223372036854775808 START WITH -9223372036854775808 INCREMENT -1 + +query I +SELECT nextval('underflow_test') +---- +-9223372036854775808 + +statement error pgcode 2200H pq: nextval\(\): reached minimum value of sequence "underflow_test" \(-9223372036854775808\) +SELECT nextval('underflow_test') + # USE WITH TABLES # You can use a sequence in a DEFAULT expression to create an auto-incrementing primary key. diff --git a/pkg/sql/sequence.go b/pkg/sql/sequence.go index 39d4270163e0..64e1d4703167 100644 --- a/pkg/sql/sequence.go +++ b/pkg/sql/sequence.go @@ -20,6 +20,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/internal/client" "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sqlbase" @@ -34,24 +35,24 @@ func (p *planner) IncrementSequence(ctx context.Context, seqName *tree.TableName if err != nil { return 0, err } + seqValueKey := keys.MakeSequenceKey(uint32(descriptor.ID)) val, err := client.IncrementValRetryable( ctx, p.txn.DB(), seqValueKey, descriptor.SequenceOpts.Increment) if err != nil { - return 0, err + switch err.(type) { + case *roachpb.IntegerOverflowError: + return 0, boundsExceededError(descriptor) + default: + return 0, err + } } seqOpts := descriptor.SequenceOpts - if val > seqOpts.MaxValue { - return 0, pgerror.NewErrorf( - pgerror.CodeSequenceGeneratorLimitExceeded, - `reached maximum value of sequence "%s" (%d)`, descriptor.Name, seqOpts.MaxValue) - } - if val < seqOpts.MinValue { - return 0, pgerror.NewErrorf( - pgerror.CodeSequenceGeneratorLimitExceeded, - `reached minimum value of sequence "%s" (%d)`, descriptor.Name, seqOpts.MinValue) + if val > seqOpts.MaxValue || val < seqOpts.MinValue { + return 0, boundsExceededError(descriptor) } + p.session.mu.Lock() defer p.session.mu.Unlock() p.session.mu.SequenceState.lastSequenceIncremented = descriptor.ID @@ -60,7 +61,25 @@ func (p *planner) IncrementSequence(ctx context.Context, seqName *tree.TableName return val, nil } -// GetLastSequenceValue implements the tree.SequenceAccessor interface. +func boundsExceededError(descriptor *sqlbase.TableDescriptor) error { + seqOpts := descriptor.SequenceOpts + isAscending := seqOpts.Increment > 0 + + var word string + var value int64 + if isAscending { + word = "maximum" + value = seqOpts.MaxValue + } else { + word = "minimum" + value = seqOpts.MinValue + } + return pgerror.NewErrorf( + pgerror.CodeSequenceGeneratorLimitExceeded, + `reached %s value of sequence "%s" (%d)`, word, descriptor.Name, value) +} + +// GetLastSequenceValue implements the tree.EvalPlanner interface. func (p *planner) GetLastSequenceValue(ctx context.Context) (int64, error) { p.session.mu.RLock() defer p.session.mu.RUnlock() diff --git a/pkg/storage/engine/mvcc.go b/pkg/storage/engine/mvcc.go index 62d225e78661..992ea110e2d0 100644 --- a/pkg/storage/engine/mvcc.go +++ b/pkg/storage/engine/mvcc.go @@ -1256,6 +1256,7 @@ func MVCCIncrement( defer iter.Close() var int64Val int64 + var newInt64Val int64 err := mvccPutUsingIter(ctx, engine, iter, ms, key, timestamp, noValue, txn, func(value *roachpb.Value) ([]byte, error) { if value.IsPresent() { var err error @@ -1266,17 +1267,23 @@ func MVCCIncrement( // Check for overflow and underflow. if willOverflow(int64Val, inc) { - return nil, errors.Errorf("key %s with value %d incremented by %d results in overflow", key, int64Val, inc) + // Return the old value, since we've failed to modify it. + newInt64Val = int64Val + return nil, &roachpb.IntegerOverflowError{ + Key: key, + CurrentValue: int64Val, + IncrementValue: inc, + } } + newInt64Val = int64Val + inc - int64Val = int64Val + inc newValue := roachpb.Value{} - newValue.SetInt(int64Val) + newValue.SetInt(newInt64Val) newValue.InitChecksum(key) return newValue.RawBytes, nil }) - return int64Val, err + return newInt64Val, err } // MVCCConditionalPut sets the value for a specified key only if the