diff --git a/cmd/migrate/main.go b/cmd/migrate/main.go index 27a3b74b933b..b5a2e6efd507 100644 --- a/cmd/migrate/main.go +++ b/cmd/migrate/main.go @@ -360,7 +360,7 @@ func (m *chunkMover) moveChunks(ctx context.Context, threadID int, syncRangeCh < } if m.sourceUser != m.destUser { // Because the incoming chunks are already encoded, to change the username we have to make a new chunk - nc := chunk.NewChunk(m.destUser, chk.Fingerprint, chk.Metric, chk.Data, chk.From, chk.Through) + nc := chunk.NewChunk(m.destUser, chk.FingerprintModel(), chk.Metric, chk.Data, chk.From, chk.Through) err := nc.Encode() if err != nil { log.Println(threadID, "Failed to encode new chunk with new user:", err) diff --git a/pkg/ingester/client/ingester.pb.go b/pkg/ingester/client/ingester.pb.go index 62ad9420524c..79efd548c0b0 100644 --- a/pkg/ingester/client/ingester.pb.go +++ b/pkg/ingester/client/ingester.pb.go @@ -1348,38 +1348,38 @@ func init() { } var fileDescriptor_5b6c87318632a5b2 = []byte{ - // 1280 bytes of a gzipped FileDescriptorProto + // 1282 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0xdf, 0x49, 0x9c, 0x1f, 0x7e, 0x76, 0x5c, 0x67, 0xd2, 0x1f, 0xe9, 0xf6, 0xdb, 0x4d, 0x3b, - 0x5f, 0x21, 0x85, 0x02, 0x31, 0x4d, 0xa9, 0x44, 0x51, 0x85, 0x94, 0x86, 0x14, 0xd2, 0x26, 0x69, + 0x5f, 0x21, 0x85, 0x16, 0x62, 0x9a, 0x52, 0x89, 0x22, 0x84, 0x94, 0x86, 0x14, 0xd2, 0x26, 0x69, 0xbb, 0x49, 0x29, 0x42, 0x48, 0xd6, 0xc4, 0x9e, 0x38, 0xab, 0xec, 0x0f, 0x77, 0x67, 0x16, 0x91, 0x1b, 0x12, 0x7f, 0x00, 0x1c, 0x10, 0x27, 0xae, 0x48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 0xeb, 0xcd, 0xb4, 0xca, 0x05, 0xa8, 0xf4, 0x43, 0x9d, 0x88, 0x84, 0x34, 0xd6, 0x9c, 0x60, 0xa8, 0xdf, 0xe7, 0x2c, 0xdc, 0x16, 0x54, 0x24, 0x12, 0xc9, 0xef, 0x08, 0x66, 0x33, 0x46, 0x4d, 0xf5, 0x16, 0xd4, 0x54, 0xb4, 0x9c, 0xc0, 0x6f, 0x86, 0x54, 0xa8, 0xcc, 0x21, 0x7b, 0x26, 0xb5, 0xda, 0x54, 0xb0, 0x38, @@ -1387,48 +1387,49 @@ var fileDescriptor_5b6c87318632a5b2 = []byte{ 0xf8, 0xb4, 0xeb, 0x34, 0x0b, 0x4c, 0xe3, 0x92, 0xa9, 0x4e, 0xbb, 0xce, 0x7a, 0x8e, 0x6c, 0x09, 0xe6, 0xc2, 0xc8, 0x65, 0x45, 0x78, 0x49, 0xc2, 0x67, 0x63, 0x57, 0x0e, 0x4f, 0x28, 0xcc, 0xc5, 0xc2, 0xd7, 0x3f, 0xc9, 0x4b, 0x3f, 0x03, 0x53, 0x11, 0x67, 0x61, 0xd3, 0x69, 0xeb, 0x6a, 0x9b, - 0x8c, 0x97, 0xeb, 0x6d, 0x7c, 0x19, 0x4a, 0x6d, 0x2a, 0xa8, 0x94, 0x59, 0x59, 0x3e, 0x9f, 0x2d, - 0x87, 0x81, 0x00, 0xd8, 0x12, 0x4a, 0x6e, 0x03, 0x8e, 0x5d, 0x3c, 0xbf, 0xc3, 0x55, 0x98, 0xe0, + 0x8c, 0x97, 0xeb, 0x6d, 0x7c, 0x05, 0x4a, 0x6d, 0x2a, 0xa8, 0x94, 0x59, 0x59, 0x3e, 0x9f, 0x2d, + 0x87, 0x81, 0x00, 0xd8, 0x12, 0x4a, 0x6e, 0x03, 0x8e, 0x5d, 0x3c, 0xbf, 0xc3, 0x35, 0x98, 0xe0, 0xb1, 0x41, 0x5f, 0x90, 0x85, 0x22, 0x53, 0x41, 0x91, 0xad, 0xd0, 0xe4,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, - 0x16, 0xfa, 0xab, 0x67, 0xa1, 0xbf, 0x7b, 0x96, 0xf1, 0xa2, 0x67, 0xa1, 0x1f, 0x9e, 0x5b, 0xc6, - 0xe3, 0xe7, 0x96, 0xf1, 0xe4, 0xb9, 0x65, 0x7c, 0x39, 0xa9, 0xfe, 0x13, 0xef, 0x4e, 0xca, 0x3b, - 0x7a, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xdf, 0x44, 0xc1, 0x31, 0x0f, 0x00, 0x00, + 0xce, 0x43, 0x1e, 0x44, 0x63, 0x11, 0xdd, 0xa0, 0x8f, 0x9f, 0x59, 0xc6, 0x93, 0x67, 0x96, 0xf1, + 0xe2, 0x99, 0x85, 0xbe, 0xed, 0x59, 0xe8, 0xd7, 0x9e, 0x85, 0x1e, 0xf5, 0x2c, 0xf4, 0xb8, 0x67, + 0xa1, 0xbf, 0x7a, 0x16, 0xfa, 0xbb, 0x67, 0x19, 0x2f, 0x7a, 0x16, 0xfa, 0xe1, 0xb9, 0x65, 0x3c, + 0x7e, 0x6e, 0x19, 0x4f, 0x9e, 0x5b, 0xc6, 0x97, 0x97, 0x47, 0xb5, 0x98, 0xc2, 0x1f, 0xe7, 0xdd, + 0x49, 0x79, 0x91, 0xaf, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x59, 0x14, 0xfe, 0xa8, 0x56, 0x0f, + 0x00, 0x00, } func (x MatchType) String() string { diff --git a/pkg/ingester/client/ingester.proto b/pkg/ingester/client/ingester.proto index c1cecc1a17f9..c24cfc67637f 100644 --- a/pkg/ingester/client/ingester.proto +++ b/pkg/ingester/client/ingester.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ingesterpb; -option go_package = "client"; +option go_package = "github.com/grafana/loki/pkg/ingester/client"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "pkg/logproto/metrics.proto"; diff --git a/pkg/ingester/flush_test.go b/pkg/ingester/flush_test.go index 831a095a9915..cdf1989e4660 100644 --- a/pkg/ingester/flush_test.go +++ b/pkg/ingester/flush_test.go @@ -179,8 +179,8 @@ func TestFlushingCollidingLabels(t *testing.T) { // make sure all chunks have different fingerprint, even colliding ones. chunkFingerprints := map[model.Fingerprint]bool{} for _, c := range store.getChunksForUser(userID) { - require.False(t, chunkFingerprints[c.Fingerprint]) - chunkFingerprints[c.Fingerprint] = true + require.False(t, chunkFingerprints[c.FingerprintModel()]) + chunkFingerprints[c.FingerprintModel()] = true } } diff --git a/pkg/logproto/logproto.pb.go b/pkg/logproto/logproto.pb.go index 0fae805de978..dfa717e57b0b 100644 --- a/pkg/logproto/logproto.pb.go +++ b/pkg/logproto/logproto.pb.go @@ -14,6 +14,7 @@ import ( _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" stats "github.com/grafana/loki/pkg/logqlmodel/stats" + github_com_prometheus_common_model "github.com/prometheus/common/model" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -1585,6 +1586,73 @@ func (m *GetChunkIDsResponse) GetChunkIDs() []string { return nil } +// ChunkRef contains the metadata to reference a Chunk. +// It is embedded by the Chunk type itself and used to generate the Chunk +// checksum. So it is imported to take care of the JSON representation of the +// resulting Go struct. +type ChunkRef struct { + Fingerprint uint64 `protobuf:"varint,1,opt,name=fingerprint,proto3" json:"fingerprint"` + UserID string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"userID"` + From github_com_prometheus_common_model.Time `protobuf:"varint,3,opt,name=from,proto3,customtype=github.com/prometheus/common/model.Time" json:"from"` + Through github_com_prometheus_common_model.Time `protobuf:"varint,4,opt,name=through,proto3,customtype=github.com/prometheus/common/model.Time" json:"through"` + // The checksum is not written to the external storage. We use crc32, + // Castagnoli table. See http://www.evanjones.ca/crc32c.html. + Checksum uint32 `protobuf:"varint,5,opt,name=checksum,proto3" json:"-"` +} + +func (m *ChunkRef) Reset() { *m = ChunkRef{} } +func (*ChunkRef) ProtoMessage() {} +func (*ChunkRef) Descriptor() ([]byte, []int) { + return fileDescriptor_c28a5f14f1f4c79a, []int{29} +} +func (m *ChunkRef) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChunkRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChunkRef.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChunkRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChunkRef.Merge(m, src) +} +func (m *ChunkRef) XXX_Size() int { + return m.Size() +} +func (m *ChunkRef) XXX_DiscardUnknown() { + xxx_messageInfo_ChunkRef.DiscardUnknown(m) +} + +var xxx_messageInfo_ChunkRef proto.InternalMessageInfo + +func (m *ChunkRef) GetFingerprint() uint64 { + if m != nil { + return m.Fingerprint + } + return 0 +} + +func (m *ChunkRef) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *ChunkRef) GetChecksum() uint32 { + if m != nil { + return m.Checksum + } + return 0 +} + func init() { proto.RegisterEnum("logproto.Direction", Direction_name, Direction_value) proto.RegisterType((*PushRequest)(nil), "logproto.PushRequest") @@ -1617,107 +1685,117 @@ func init() { proto.RegisterType((*TailersCountResponse)(nil), "logproto.TailersCountResponse") proto.RegisterType((*GetChunkIDsRequest)(nil), "logproto.GetChunkIDsRequest") proto.RegisterType((*GetChunkIDsResponse)(nil), "logproto.GetChunkIDsResponse") + proto.RegisterType((*ChunkRef)(nil), "logproto.ChunkRef") } func init() { proto.RegisterFile("pkg/logproto/logproto.proto", fileDescriptor_c28a5f14f1f4c79a) } var fileDescriptor_c28a5f14f1f4c79a = []byte{ - // 1520 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4b, 0x6f, 0x53, 0xc7, - 0x17, 0xf7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8f, - 0x5f, 0x54, 0x62, 0x4f, 0x5f, 0x54, 0x62, 0xcf, 0x5e, 0x54, 0x62, 0xf7, 0x4f, 0x9a, 0x7f, 0x2e, - 0x04, 0xee, 0x96, 0xdb, 0x77, 0x97, 0xba, 0xfe, 0x8e, 0xb7, 0x64, 0xfe, 0x79, 0xb1, 0x69, 0x89, - 0xaf, 0xff, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xce, 0xd4, 0x16, 0x65, 0xd3, 0x10, 0x00, 0x00, + // 1654 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x49, 0x6f, 0x1b, 0xc9, + 0x15, 0x66, 0x71, 0x69, 0x92, 0x8f, 0x8b, 0x88, 0x92, 0x2c, 0x71, 0x38, 0x33, 0x6c, 0x4e, 0x63, + 0x30, 0x26, 0xbc, 0x90, 0xb1, 0xb2, 0xd8, 0x96, 0xb3, 0x40, 0xb4, 0x62, 0x5b, 0xb6, 0x12, 0xdb, + 0x2d, 0x05, 0x06, 0x0c, 0x04, 0x46, 0x8b, 0x2c, 0x91, 0x0d, 0xb1, 0xd9, 0x74, 0x57, 0xd3, 0x80, + 0x80, 0x00, 0xc9, 0x0f, 0x48, 0x00, 0xe7, 0x14, 0xe4, 0x9e, 0x43, 0x90, 0x43, 0x0e, 0xf9, 0x13, + 0x71, 0x6e, 0x3e, 0x1a, 0x3e, 0x30, 0x31, 0x7d, 0x09, 0x88, 0x1c, 0xfc, 0x0b, 0x82, 0xa0, 0xb6, + 0x66, 0x91, 0x96, 0x62, 0xd3, 0x97, 0xb9, 0x88, 0xf5, 0x5e, 0xbd, 0xad, 0xbe, 0x7a, 0x4b, 0xb5, + 0xe0, 0xf3, 0xe1, 0x71, 0xb7, 0xd9, 0xf7, 0xbb, 0xc3, 0xc0, 0x0f, 0xfd, 0x68, 0xd1, 0xe0, 0x7f, + 0x71, 0x46, 0xd1, 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x9c, 0x54, 0xd1, 0xbf, 0x26, 0x55, 0xf4, 0xef, 0x49, 0x35, + 0xf6, 0x6e, 0x52, 0x45, 0xcf, 0xdf, 0x56, 0x63, 0x2f, 0xdf, 0x56, 0x63, 0xaf, 0xde, 0x56, 0x63, + 0x8f, 0xbf, 0xd6, 0xff, 0x23, 0x13, 0x38, 0x47, 0xce, 0xc0, 0x69, 0xf6, 0xfd, 0x63, 0xb7, 0xa9, + 0xff, 0xc7, 0xe7, 0xd0, 0xe0, 0x3f, 0xdf, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xf9, + 0x78, 0x9a, 0x08, 0x12, 0x00, 0x00, } func (x Direction) String() string { @@ -2639,6 +2717,42 @@ func (this *GetChunkIDsResponse) Equal(that interface{}) bool { } return true } +func (this *ChunkRef) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ChunkRef) + if !ok { + that2, ok := that.(ChunkRef) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Fingerprint != that1.Fingerprint { + return false + } + if this.UserID != that1.UserID { + return false + } + if !this.From.Equal(that1.From) { + return false + } + if !this.Through.Equal(that1.Through) { + return false + } + if this.Checksum != that1.Checksum { + return false + } + return true +} func (this *PushRequest) GoString() string { if this == nil { return "nil" @@ -3007,6 +3121,20 @@ func (this *GetChunkIDsResponse) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ChunkRef) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&logproto.ChunkRef{") + s = append(s, "Fingerprint: "+fmt.Sprintf("%#v", this.Fingerprint)+",\n") + s = append(s, "UserID: "+fmt.Sprintf("%#v", this.UserID)+",\n") + s = append(s, "From: "+fmt.Sprintf("%#v", this.From)+",\n") + s = append(s, "Through: "+fmt.Sprintf("%#v", this.Through)+",\n") + s = append(s, "Checksum: "+fmt.Sprintf("%#v", this.Checksum)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringLogproto(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -4815,6 +4943,56 @@ func (m *GetChunkIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ChunkRef) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChunkRef) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChunkRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Checksum != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Checksum)) + i-- + dAtA[i] = 0x28 + } + if m.Through != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Through)) + i-- + dAtA[i] = 0x20 + } + if m.From != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x18 + } + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintLogproto(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0x12 + } + if m.Fingerprint != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Fingerprint)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintLogproto(dAtA []byte, offset int, v uint64) int { offset -= sovLogproto(v) base := offset @@ -5350,6 +5528,31 @@ func (m *GetChunkIDsResponse) Size() (n int) { return n } +func (m *ChunkRef) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fingerprint != 0 { + n += 1 + sovLogproto(uint64(m.Fingerprint)) + } + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovLogproto(uint64(l)) + } + if m.From != 0 { + n += 1 + sovLogproto(uint64(m.From)) + } + if m.Through != 0 { + n += 1 + sovLogproto(uint64(m.Through)) + } + if m.Checksum != 0 { + n += 1 + sovLogproto(uint64(m.Checksum)) + } + return n +} + func sovLogproto(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5734,6 +5937,20 @@ func (this *GetChunkIDsResponse) String() string { }, "") return s } +func (this *ChunkRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ChunkRef{`, + `Fingerprint:` + fmt.Sprintf("%v", this.Fingerprint) + `,`, + `UserID:` + fmt.Sprintf("%v", this.UserID) + `,`, + `From:` + fmt.Sprintf("%v", this.From) + `,`, + `Through:` + fmt.Sprintf("%v", this.Through) + `,`, + `Checksum:` + fmt.Sprintf("%v", this.Checksum) + `,`, + `}`, + }, "") + return s +} func valueToStringLogproto(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -9362,6 +9579,167 @@ func (m *GetChunkIDsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *ChunkRef) 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 ErrIntOverflowLogproto + } + 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: ChunkRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChunkRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Fingerprint", wireType) + } + m.Fingerprint = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Fingerprint |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= github_com_prometheus_common_model.Time(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Through", wireType) + } + m.Through = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Through |= github_com_prometheus_common_model.Time(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) + } + m.Checksum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Checksum |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLogproto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipLogproto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/pkg/logproto/logproto.proto b/pkg/logproto/logproto.proto index 7270601e2b75..0c454ad91442 100644 --- a/pkg/logproto/logproto.proto +++ b/pkg/logproto/logproto.proto @@ -194,3 +194,18 @@ message GetChunkIDsRequest { message GetChunkIDsResponse { repeated string chunkIDs = 1; } + +// ChunkRef contains the metadata to reference a Chunk. +// It is embedded by the Chunk type itself and used to generate the Chunk +// checksum. So it is imported to take care of the JSON representation of the +// resulting Go struct. +message ChunkRef { + uint64 fingerprint = 1 [(gogoproto.jsontag) = "fingerprint"]; + string user_id = 2 [(gogoproto.customname) = "UserID", (gogoproto.jsontag) = "userID"]; + int64 from = 3 [(gogoproto.jsontag) = "from", (gogoproto.customtype) = "github.com/prometheus/common/model.Time", (gogoproto.nullable) = false]; + int64 through = 4 [(gogoproto.jsontag) = "through", (gogoproto.customtype) = "github.com/prometheus/common/model.Time", (gogoproto.nullable) = false]; + + // The checksum is not written to the external storage. We use crc32, + // Castagnoli table. See http://www.evanjones.ca/crc32c.html. + uint32 checksum = 5 [(gogoproto.jsontag) = "-"]; +} diff --git a/pkg/logproto/types.go b/pkg/logproto/types.go index 554ca79c469f..d80f8c2af347 100644 --- a/pkg/logproto/types.go +++ b/pkg/logproto/types.go @@ -4,6 +4,8 @@ import ( fmt "fmt" io "io" "time" + + "github.com/prometheus/common/model" ) // Stream contains a unique labels set as a string and a set of entries for it. @@ -463,3 +465,7 @@ func (m *Entry) Equal(that interface{}) bool { } return true } + +func (c *ChunkRef) FingerprintModel() model.Fingerprint { + return model.Fingerprint(c.Fingerprint) +} diff --git a/pkg/storage/batch.go b/pkg/storage/batch.go index 5bb073424d98..e394388c8299 100644 --- a/pkg/storage/batch.go +++ b/pkg/storage/batch.go @@ -775,7 +775,7 @@ func loadFirstChunks(ctx context.Context, s chunk.SchemaConfig, chks map[model.F func partitionBySeriesChunks(chunks []*LazyChunk) map[model.Fingerprint][][]*LazyChunk { chunksByFp := map[model.Fingerprint][]*LazyChunk{} for _, c := range chunks { - fp := c.Chunk.Fingerprint + fp := c.Chunk.FingerprintModel() chunksByFp[fp] = append(chunksByFp[fp], c) } result := make(map[model.Fingerprint][][]*LazyChunk, len(chunksByFp)) diff --git a/pkg/storage/chunk/cache/cache_test.go b/pkg/storage/chunk/cache/cache_test.go index 4e243a98bf22..727b965d39e2 100644 --- a/pkg/storage/chunk/cache/cache_test.go +++ b/pkg/storage/chunk/cache/cache_test.go @@ -13,6 +13,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/cache" prom_chunk "github.com/grafana/loki/pkg/storage/chunk/encoding" @@ -58,11 +59,13 @@ func fillCache(t *testing.T, scfg chunk.SchemaConfig, cache cache.Cache) ([]stri // cleanup the chunk to avoid any internal references mismatch (ie. appender // pointer). cleanChunk := chunk.Chunk{ - UserID: c.UserID, - Fingerprint: c.Fingerprint, - From: c.From, - Through: c.Through, - Checksum: c.Checksum, + ChunkRef: logproto.ChunkRef{ + UserID: c.UserID, + Fingerprint: c.Fingerprint, + From: c.From, + Through: c.Through, + Checksum: c.Checksum, + }, ChecksumSet: c.ChecksumSet, } err = cleanChunk.Decode(chunk.NewDecodeContext(), buf) diff --git a/pkg/storage/chunk/chunk.go b/pkg/storage/chunk/chunk.go index 3ad05515ea4d..8c325c4302fc 100644 --- a/pkg/storage/chunk/chunk.go +++ b/pkg/storage/chunk/chunk.go @@ -17,6 +17,7 @@ import ( "github.com/prometheus/prometheus/model/labels" errs "github.com/weaveworks/common/errors" + "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/prom1/storage/metric" prom_chunk "github.com/grafana/loki/pkg/storage/chunk/encoding" ) @@ -37,21 +38,12 @@ func errInvalidChunkID(s string) error { // Chunk contains encoded timeseries data type Chunk struct { - // These two fields will be missing from older chunks (as will the hash). - // On fetch we will initialise these fields from the DynamoDB key. - Fingerprint model.Fingerprint `json:"fingerprint"` - UserID string `json:"userID"` - - // These fields will be in all chunks, including old ones. - From model.Time `json:"from"` - Through model.Time `json:"through"` - Metric labels.Labels `json:"metric"` - - // The hash is not written to the external storage either. We use - // crc32, Castagnoli table. See http://www.evanjones.ca/crc32c.html. + logproto.ChunkRef + + Metric labels.Labels `json:"metric"` + // For old chunks, ChecksumSet will be false. - ChecksumSet bool `json:"-"` - Checksum uint32 `json:"-"` + ChecksumSet bool `json:"-"` // We never use Delta encoding (the zero value), so if this entry is // missing, we default to DoubleDelta. @@ -65,13 +57,15 @@ type Chunk struct { // NewChunk creates a new chunk func NewChunk(userID string, fp model.Fingerprint, metric labels.Labels, c prom_chunk.Chunk, from, through model.Time) Chunk { return Chunk{ - Fingerprint: fp, - UserID: userID, - From: from, - Through: through, - Metric: metric, - Encoding: c.Encoding(), - Data: c, + ChunkRef: logproto.ChunkRef{ + Fingerprint: uint64(fp), + UserID: userID, + From: from, + Through: through, + }, + Metric: metric, + Encoding: c.Encoding(), + Data: c, } } @@ -120,10 +114,12 @@ func parseLegacyChunkID(userID, key string) (Chunk, error) { return Chunk{}, err } return Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(fingerprint), - From: model.Time(from), - Through: model.Time(through), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: fingerprint, + From: model.Time(from), + Through: model.Time(through), + }, }, nil } @@ -169,11 +165,13 @@ func parseNewExternalKey(userID, key string) (Chunk, error) { return Chunk{}, err } return Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(fingerprint), - From: model.Time(from), - Through: model.Time(through), - Checksum: uint32(checksum), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: fingerprint, + From: model.Time(from), + Through: model.Time(through), + Checksum: uint32(checksum), + }, ChecksumSet: true, }, nil } @@ -226,11 +224,13 @@ func parseNewerExternalKey(userID, key string) (Chunk, error) { return Chunk{}, errors.Wrap(err, "parsing checksum") } return Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(fingerprint), - From: model.Time(from), - Through: model.Time(through), - Checksum: uint32(checksum), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: fingerprint, + From: model.Time(from), + Through: model.Time(through), + Checksum: uint32(checksum), + }, ChecksumSet: true, }, nil } @@ -427,6 +427,6 @@ func (c *Chunk) Slice(from, through model.Time) (*Chunk, error) { return nil, err } - nc := NewChunk(c.UserID, c.Fingerprint, c.Metric, pc, from, through) + nc := NewChunk(c.UserID, c.FingerprintModel(), c.Metric, pc, from, through) return &nc, nil } diff --git a/pkg/storage/chunk/chunk_store_utils.go b/pkg/storage/chunk/chunk_store_utils.go index c04b5c88f101..ae969fc343c2 100644 --- a/pkg/storage/chunk/chunk_store_utils.go +++ b/pkg/storage/chunk/chunk_store_utils.go @@ -61,12 +61,12 @@ func filterChunksByUniqueFingerprint(s SchemaConfig, chunks []Chunk) ([]Chunk, [ uniqueFp := map[model.Fingerprint]struct{}{} for _, chunk := range chunks { - if _, ok := uniqueFp[chunk.Fingerprint]; ok { + if _, ok := uniqueFp[chunk.FingerprintModel()]; ok { continue } filtered = append(filtered, chunk) keys = append(keys, s.ExternalKey(chunk)) - uniqueFp[chunk.Fingerprint] = struct{}{} + uniqueFp[chunk.FingerprintModel()] = struct{}{} } return filtered, keys } diff --git a/pkg/storage/chunk/chunk_test.go b/pkg/storage/chunk/chunk_test.go index c443474be878..e8cedb62ea1c 100644 --- a/pkg/storage/chunk/chunk_test.go +++ b/pkg/storage/chunk/chunk_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/grafana/loki/pkg/ingester/client" + "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk/encoding" "github.com/grafana/loki/pkg/util" ) @@ -197,28 +198,34 @@ func TestParseExternalKey(t *testing.T) { err error }{ {key: "2:1484661279394:1484664879394", chunk: Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(2), - From: model.Time(1484661279394), - Through: model.Time(1484664879394), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: uint64(2), + From: model.Time(1484661279394), + Through: model.Time(1484664879394), + }, }}, {key: userID + "/2:270d8f00:270d8f00:f84c5745", chunk: Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(2), - From: model.Time(655200000), - Through: model.Time(655200000), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: uint64(2), + From: model.Time(655200000), + Through: model.Time(655200000), + Checksum: 4165752645, + }, ChecksumSet: true, - Checksum: 4165752645, }}, {key: userID + "/2/270d8f00:270d8f00:f84c5745", chunk: Chunk{ - UserID: userID, - Fingerprint: model.Fingerprint(2), - From: model.Time(655200000), - Through: model.Time(655200000), + ChunkRef: logproto.ChunkRef{ + UserID: userID, + Fingerprint: uint64(2), + From: model.Time(655200000), + Through: model.Time(655200000), + Checksum: 4165752645, + }, ChecksumSet: true, - Checksum: 4165752645, }}, {key: "invalidUserID/2:270d8f00:270d8f00:f84c5745", chunk: Chunk{}, err: ErrWrongMetadata}, @@ -417,29 +424,14 @@ func TestChunkKeys(t *testing.T) { { name: "Legacy key (pre-checksum)", chunk: Chunk{ - Fingerprint: 100, - UserID: "fake", - From: model.TimeFromUnix(1000), - Through: model.TimeFromUnix(5000), - }, - schemaCfg: SchemaConfig{ - Configs: []PeriodConfig{ - { - From: DayTime{Time: 0}, - Schema: "v9", - }, + ChunkRef: logproto.ChunkRef{ + Fingerprint: 100, + UserID: "fake", + From: model.TimeFromUnix(1000), + Through: model.TimeFromUnix(5000), + Checksum: 12345, }, - }, - }, - { - name: "New key (post-checksum)", - chunk: Chunk{ - Fingerprint: 100, - UserID: "fake", - From: model.TimeFromUnix(1000), - Through: model.TimeFromUnix(5000), ChecksumSet: true, - Checksum: 12345, }, schemaCfg: SchemaConfig{ Configs: []PeriodConfig{ @@ -454,12 +446,14 @@ func TestChunkKeys(t *testing.T) { { name: "Newer key (post-v12)", chunk: Chunk{ - Fingerprint: 100, - UserID: "fake", - From: model.TimeFromUnix(1000), - Through: model.TimeFromUnix(5000), + ChunkRef: logproto.ChunkRef{ + Fingerprint: 100, + UserID: "fake", + From: model.TimeFromUnix(1000), + Through: model.TimeFromUnix(5000), + Checksum: 12345, + }, ChecksumSet: true, - Checksum: 12345, }, schemaCfg: SchemaConfig{ Configs: []PeriodConfig{ diff --git a/pkg/storage/chunk/fixtures.go b/pkg/storage/chunk/fixtures.go index b166d584a730..e5c070606f47 100644 --- a/pkg/storage/chunk/fixtures.go +++ b/pkg/storage/chunk/fixtures.go @@ -67,8 +67,8 @@ func ChunksToMatrix(ctx context.Context, chunks []Chunk, from, through model.Tim return nil, err } - metrics[c.Fingerprint] = util.LabelsToMetric(c.Metric) - samplesBySeries[c.Fingerprint] = append(samplesBySeries[c.Fingerprint], ss) + metrics[c.FingerprintModel()] = util.LabelsToMetric(c.Metric) + samplesBySeries[c.FingerprintModel()] = append(samplesBySeries[c.FingerprintModel()], ss) } matrix := make(model.Matrix, 0, len(samplesBySeries)) diff --git a/pkg/storage/chunk/grpc/grpc_client_test.go b/pkg/storage/chunk/grpc/grpc_client_test.go index 0de9650a9f44..40482fa0c240 100644 --- a/pkg/storage/chunk/grpc/grpc_client_test.go +++ b/pkg/storage/chunk/grpc/grpc_client_test.go @@ -7,6 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/encoding" prom_chunk "github.com/grafana/loki/pkg/storage/chunk/encoding" @@ -78,10 +79,13 @@ func TestGrpcStore(t *testing.T) { putChunksTestData := []chunk.Chunk{ { - Fingerprint: 15993187966453505842, - UserID: "fake", - From: 1587997054298, - Through: 1587997054298, + ChunkRef: logproto.ChunkRef{ + Fingerprint: uint64(15993187966453505842), + UserID: "fake", + From: 1587997054298, + Through: 1587997054298, + Checksum: 3651208117, + }, Metric: labels.Labels{ { Name: "_name_", @@ -97,7 +101,6 @@ func TestGrpcStore(t *testing.T) { }, }, ChecksumSet: true, - Checksum: 3651208117, Encoding: encoding.Bigchunk, Data: prom_chunk.New(), }, @@ -107,10 +110,13 @@ func TestGrpcStore(t *testing.T) { getChunksTestData := []chunk.Chunk{ { - Fingerprint: 15993187966453505842, - UserID: "fake", - From: 1587997054298, - Through: 1587997054298, + ChunkRef: logproto.ChunkRef{ + Fingerprint: uint64(15993187966453505842), + UserID: "fake", + From: 1587997054298, + Through: 1587997054298, + Checksum: 3651208117, + }, Metric: labels.Labels{ { Name: "_name_", @@ -126,7 +132,6 @@ func TestGrpcStore(t *testing.T) { }, }, ChecksumSet: true, - Checksum: 3651208117, Encoding: encoding.Bigchunk, Data: prom_chunk.New(), }, diff --git a/pkg/storage/chunk/objectclient/client_test.go b/pkg/storage/chunk/objectclient/client_test.go index 2fa659a2806a..ee06234de2c7 100644 --- a/pkg/storage/chunk/objectclient/client_test.go +++ b/pkg/storage/chunk/objectclient/client_test.go @@ -7,6 +7,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" + "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/storage/chunk" ) @@ -36,21 +37,25 @@ func TestFSEncoder(t *testing.T) { // chunk that resolves to v11 oldChunk := chunk.Chunk{ - UserID: "fake", - From: MustParseDayTime("2020-01-02").Time, - Through: MustParseDayTime("2020-01-03").Time, - Checksum: 123, - Fingerprint: 456, + ChunkRef: logproto.ChunkRef{ + UserID: "fake", + From: MustParseDayTime("2020-01-02").Time, + Through: MustParseDayTime("2020-01-03").Time, + Fingerprint: uint64(456), + Checksum: 123, + }, ChecksumSet: true, } // chunk that resolves to v12 newChunk := chunk.Chunk{ - UserID: "fake", - From: MustParseDayTime("2022-01-02").Time, - Through: MustParseDayTime("2022-01-03").Time, - Checksum: 123, - Fingerprint: 456, + ChunkRef: logproto.ChunkRef{ + UserID: "fake", + From: MustParseDayTime("2022-01-02").Time, + Through: MustParseDayTime("2022-01-03").Time, + Fingerprint: uint64(456), + Checksum: 123, + }, ChecksumSet: true, } diff --git a/pkg/storage/chunk/schema_config.go b/pkg/storage/chunk/schema_config.go index 979d10437306..12f4b3128630 100644 --- a/pkg/storage/chunk/schema_config.go +++ b/pkg/storage/chunk/schema_config.go @@ -478,10 +478,10 @@ func (cfg SchemaConfig) legacyExternalKey(chunk Chunk) string { // post-checksum func (cfg SchemaConfig) newExternalKey(chunk Chunk) string { // This is the inverse of chunk.parseNewExternalKey. - return fmt.Sprintf("%s/%x:%x:%x:%x", chunk.UserID, uint64(chunk.Fingerprint), int64(chunk.From), int64(chunk.Through), chunk.Checksum) + return fmt.Sprintf("%s/%x:%x:%x:%x", chunk.UserID, chunk.Fingerprint, int64(chunk.From), int64(chunk.Through), chunk.Checksum) } // v12+ func (cfg SchemaConfig) newerExternalKey(chunk Chunk) string { - return fmt.Sprintf("%s/%x/%x:%x:%x", chunk.UserID, uint64(chunk.Fingerprint), int64(chunk.From), int64(chunk.Through), chunk.Checksum) + return fmt.Sprintf("%s/%x/%x:%x:%x", chunk.UserID, chunk.Fingerprint, int64(chunk.From), int64(chunk.Through), chunk.Checksum) } diff --git a/pkg/storage/lazy_chunk_test.go b/pkg/storage/lazy_chunk_test.go index c29e37ef6f8c..29b81fc0bad4 100644 --- a/pkg/storage/lazy_chunk_test.go +++ b/pkg/storage/lazy_chunk_test.go @@ -161,8 +161,10 @@ func lazyChunkWithBounds(from, through time.Time) *LazyChunk { fromM, throughM := util.RoundToMilliseconds(from, through) return &LazyChunk{ Chunk: chunk.Chunk{ - From: fromM, - Through: throughM, + ChunkRef: logproto.ChunkRef{ + From: fromM, + Through: throughM, + }, }, } } diff --git a/pkg/storage/stores/shipper/compactor/retention/retention.go b/pkg/storage/stores/shipper/compactor/retention/retention.go index af85b35d2329..895689768250 100644 --- a/pkg/storage/stores/shipper/compactor/retention/retention.go +++ b/pkg/storage/stores/shipper/compactor/retention/retention.go @@ -341,7 +341,7 @@ func (c *chunkRewriter) rewriteChunk(ctx context.Context, ce ChunkEntry, interva } newChunk := chunk.NewChunk( - userID, chks[0].Fingerprint, chks[0].Metric, + userID, chks[0].FingerprintModel(), chks[0].Metric, facade, interval.Start, interval.End,