diff --git a/pkg/logproto/logproto.pb.go b/pkg/logproto/logproto.pb.go index 23672d9dc7ec..0fae805de978 100644 --- a/pkg/logproto/logproto.pb.go +++ b/pkg/logproto/logproto.pb.go @@ -137,6 +137,7 @@ type QueryRequest struct { End time.Time `protobuf:"bytes,4,opt,name=end,proto3,stdtime" json:"end"` Direction Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` Shards []string `protobuf:"bytes,7,rep,name=shards,proto3" json:"shards,omitempty"` + Deletes []*Delete `protobuf:"bytes,8,rep,name=deletes,proto3" json:"deletes,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } @@ -213,11 +214,19 @@ func (m *QueryRequest) GetShards() []string { return nil } +func (m *QueryRequest) GetDeletes() []*Delete { + if m != nil { + return m.Deletes + } + return nil +} + type SampleQueryRequest struct { Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` Start time.Time `protobuf:"bytes,2,opt,name=start,proto3,stdtime" json:"start"` End time.Time `protobuf:"bytes,3,opt,name=end,proto3,stdtime" json:"end"` Shards []string `protobuf:"bytes,4,rep,name=shards,proto3" json:"shards,omitempty"` + Deletes []*Delete `protobuf:"bytes,5,rep,name=deletes,proto3" json:"deletes,omitempty"` } func (m *SampleQueryRequest) Reset() { *m = SampleQueryRequest{} } @@ -280,6 +289,72 @@ func (m *SampleQueryRequest) GetShards() []string { return nil } +func (m *SampleQueryRequest) GetDeletes() []*Delete { + if m != nil { + return m.Deletes + } + return nil +} + +type Delete struct { + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` +} + +func (m *Delete) Reset() { *m = Delete{} } +func (*Delete) ProtoMessage() {} +func (*Delete) Descriptor() ([]byte, []int) { + return fileDescriptor_c28a5f14f1f4c79a, []int{4} +} +func (m *Delete) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Delete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Delete.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 *Delete) XXX_Merge(src proto.Message) { + xxx_messageInfo_Delete.Merge(m, src) +} +func (m *Delete) XXX_Size() int { + return m.Size() +} +func (m *Delete) XXX_DiscardUnknown() { + xxx_messageInfo_Delete.DiscardUnknown(m) +} + +var xxx_messageInfo_Delete proto.InternalMessageInfo + +func (m *Delete) GetSelector() string { + if m != nil { + return m.Selector + } + return "" +} + +func (m *Delete) GetStart() int64 { + if m != nil { + return m.Start + } + return 0 +} + +func (m *Delete) GetEnd() int64 { + if m != nil { + return m.End + } + return 0 +} + type QueryResponse struct { Streams []Stream `protobuf:"bytes,1,rep,name=streams,proto3,customtype=Stream" json:"streams,omitempty"` Stats stats.Ingester `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats"` @@ -288,7 +363,7 @@ type QueryResponse struct { func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{4} + return fileDescriptor_c28a5f14f1f4c79a, []int{5} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +407,7 @@ type SampleQueryResponse struct { func (m *SampleQueryResponse) Reset() { *m = SampleQueryResponse{} } func (*SampleQueryResponse) ProtoMessage() {} func (*SampleQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{5} + return fileDescriptor_c28a5f14f1f4c79a, []int{6} } func (m *SampleQueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -378,7 +453,7 @@ type LabelRequest struct { func (m *LabelRequest) Reset() { *m = LabelRequest{} } func (*LabelRequest) ProtoMessage() {} func (*LabelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{6} + return fileDescriptor_c28a5f14f1f4c79a, []int{7} } func (m *LabelRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +517,7 @@ type LabelResponse struct { func (m *LabelResponse) Reset() { *m = LabelResponse{} } func (*LabelResponse) ProtoMessage() {} func (*LabelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{7} + return fileDescriptor_c28a5f14f1f4c79a, []int{8} } func (m *LabelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -488,7 +563,7 @@ type StreamAdapter struct { func (m *StreamAdapter) Reset() { *m = StreamAdapter{} } func (*StreamAdapter) ProtoMessage() {} func (*StreamAdapter) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{8} + return fileDescriptor_c28a5f14f1f4c79a, []int{9} } func (m *StreamAdapter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -546,7 +621,7 @@ type EntryAdapter struct { func (m *EntryAdapter) Reset() { *m = EntryAdapter{} } func (*EntryAdapter) ProtoMessage() {} func (*EntryAdapter) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{9} + return fileDescriptor_c28a5f14f1f4c79a, []int{10} } func (m *EntryAdapter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -598,7 +673,7 @@ type Sample struct { func (m *Sample) Reset() { *m = Sample{} } func (*Sample) ProtoMessage() {} func (*Sample) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{10} + return fileDescriptor_c28a5f14f1f4c79a, []int{11} } func (m *Sample) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -657,7 +732,7 @@ type LegacySample struct { func (m *LegacySample) Reset() { *m = LegacySample{} } func (*LegacySample) ProtoMessage() {} func (*LegacySample) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{11} + return fileDescriptor_c28a5f14f1f4c79a, []int{12} } func (m *LegacySample) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -709,7 +784,7 @@ type Series struct { func (m *Series) Reset() { *m = Series{} } func (*Series) ProtoMessage() {} func (*Series) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{12} + return fileDescriptor_c28a5f14f1f4c79a, []int{13} } func (m *Series) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -769,7 +844,7 @@ type TailRequest struct { func (m *TailRequest) Reset() { *m = TailRequest{} } func (*TailRequest) ProtoMessage() {} func (*TailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{13} + return fileDescriptor_c28a5f14f1f4c79a, []int{14} } func (m *TailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -834,7 +909,7 @@ type TailResponse struct { func (m *TailResponse) Reset() { *m = TailResponse{} } func (*TailResponse) ProtoMessage() {} func (*TailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{14} + return fileDescriptor_c28a5f14f1f4c79a, []int{15} } func (m *TailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -880,7 +955,7 @@ type SeriesRequest struct { func (m *SeriesRequest) Reset() { *m = SeriesRequest{} } func (*SeriesRequest) ProtoMessage() {} func (*SeriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{15} + return fileDescriptor_c28a5f14f1f4c79a, []int{16} } func (m *SeriesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -944,7 +1019,7 @@ type SeriesResponse struct { func (m *SeriesResponse) Reset() { *m = SeriesResponse{} } func (*SeriesResponse) ProtoMessage() {} func (*SeriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{16} + return fileDescriptor_c28a5f14f1f4c79a, []int{17} } func (m *SeriesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -987,7 +1062,7 @@ type SeriesIdentifier struct { func (m *SeriesIdentifier) Reset() { *m = SeriesIdentifier{} } func (*SeriesIdentifier) ProtoMessage() {} func (*SeriesIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{17} + return fileDescriptor_c28a5f14f1f4c79a, []int{18} } func (m *SeriesIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1107,7 @@ type DroppedStream struct { func (m *DroppedStream) Reset() { *m = DroppedStream{} } func (*DroppedStream) ProtoMessage() {} func (*DroppedStream) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{18} + return fileDescriptor_c28a5f14f1f4c79a, []int{19} } func (m *DroppedStream) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1092,7 +1167,7 @@ type TimeSeriesChunk struct { func (m *TimeSeriesChunk) Reset() { *m = TimeSeriesChunk{} } func (*TimeSeriesChunk) ProtoMessage() {} func (*TimeSeriesChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{19} + return fileDescriptor_c28a5f14f1f4c79a, []int{20} } func (m *TimeSeriesChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1157,7 +1232,7 @@ type LabelPair struct { func (m *LabelPair) Reset() { *m = LabelPair{} } func (*LabelPair) ProtoMessage() {} func (*LabelPair) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{20} + return fileDescriptor_c28a5f14f1f4c79a, []int{21} } func (m *LabelPair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1209,7 +1284,7 @@ type LegacyLabelPair struct { func (m *LegacyLabelPair) Reset() { *m = LegacyLabelPair{} } func (*LegacyLabelPair) ProtoMessage() {} func (*LegacyLabelPair) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{21} + return fileDescriptor_c28a5f14f1f4c79a, []int{22} } func (m *LegacyLabelPair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1259,7 +1334,7 @@ type Chunk struct { func (m *Chunk) Reset() { *m = Chunk{} } func (*Chunk) ProtoMessage() {} func (*Chunk) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{22} + return fileDescriptor_c28a5f14f1f4c79a, []int{23} } func (m *Chunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1301,7 +1376,7 @@ type TransferChunksResponse struct { func (m *TransferChunksResponse) Reset() { *m = TransferChunksResponse{} } func (*TransferChunksResponse) ProtoMessage() {} func (*TransferChunksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{23} + return fileDescriptor_c28a5f14f1f4c79a, []int{24} } func (m *TransferChunksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1336,7 +1411,7 @@ type TailersCountRequest struct { func (m *TailersCountRequest) Reset() { *m = TailersCountRequest{} } func (*TailersCountRequest) ProtoMessage() {} func (*TailersCountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{24} + return fileDescriptor_c28a5f14f1f4c79a, []int{25} } func (m *TailersCountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1372,7 +1447,7 @@ type TailersCountResponse struct { func (m *TailersCountResponse) Reset() { *m = TailersCountResponse{} } func (*TailersCountResponse) ProtoMessage() {} func (*TailersCountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{25} + return fileDescriptor_c28a5f14f1f4c79a, []int{26} } func (m *TailersCountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1417,7 +1492,7 @@ type GetChunkIDsRequest struct { func (m *GetChunkIDsRequest) Reset() { *m = GetChunkIDsRequest{} } func (*GetChunkIDsRequest) ProtoMessage() {} func (*GetChunkIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{26} + return fileDescriptor_c28a5f14f1f4c79a, []int{27} } func (m *GetChunkIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1474,7 +1549,7 @@ type GetChunkIDsResponse struct { func (m *GetChunkIDsResponse) Reset() { *m = GetChunkIDsResponse{} } func (*GetChunkIDsResponse) ProtoMessage() {} func (*GetChunkIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{27} + return fileDescriptor_c28a5f14f1f4c79a, []int{28} } func (m *GetChunkIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1516,6 +1591,7 @@ func init() { proto.RegisterType((*PushResponse)(nil), "logproto.PushResponse") proto.RegisterType((*QueryRequest)(nil), "logproto.QueryRequest") proto.RegisterType((*SampleQueryRequest)(nil), "logproto.SampleQueryRequest") + proto.RegisterType((*Delete)(nil), "logproto.Delete") proto.RegisterType((*QueryResponse)(nil), "logproto.QueryResponse") proto.RegisterType((*SampleQueryResponse)(nil), "logproto.SampleQueryResponse") proto.RegisterType((*LabelRequest)(nil), "logproto.LabelRequest") @@ -1546,100 +1622,102 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/logproto.proto", fileDescriptor_c28a5f14f1f4c79a) } var fileDescriptor_c28a5f14f1f4c79a = []byte{ - // 1482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4b, 0x6f, 0x13, 0xd7, - 0x17, 0xf7, 0xb5, 0xc7, 0x13, 0xfb, 0xd8, 0x71, 0xac, 0x9b, 0x90, 0x18, 0x03, 0x63, 0xff, 0x47, - 0x08, 0xac, 0x3f, 0xe0, 0x94, 0xf4, 0xc5, 0xa3, 0x0f, 0xc5, 0xa4, 0x40, 0x28, 0x2d, 0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 0xda, 0x68, 0xa4, 0x66, 0x45, - 0x63, 0x74, 0x34, 0xe3, 0xdf, 0x8f, 0x66, 0x7f, 0x01, 0xf3, 0xf2, 0x34, 0xa2, 0x06, 0xf0, 0xfa, - 0x2b, 0x57, 0x57, 0xe1, 0xf1, 0xa0, 0x82, 0x46, 0x15, 0x16, 0x97, 0x15, 0x3e, 0xc5, 0x4f, 0x1d, - 0x51, 0x79, 0xea, 0x85, 0xba, 0x28, 0xe6, 0xcd, 0x6e, 0x9b, 0x50, 0xa6, 0x68, 0xb0, 0x80, 0x1d, - 0x21, 0x63, 0x7f, 0x0e, 0x8b, 0x63, 0xa0, 0xca, 0x30, 0xce, 0x81, 0x49, 0x49, 0xe8, 0x11, 0x15, - 0x45, 0x51, 0x8b, 0x82, 0xf3, 0x35, 0xf7, 0x9c, 0x76, 0xa4, 0xfc, 0x6c, 0xde, 0x7f, 0x46, 0x90, - 0xbf, 0xee, 0x6e, 0x91, 0x8e, 0xca, 0x26, 0x06, 0xa3, 0xeb, 0xfa, 0x44, 0x66, 0x92, 0xaf, 0xf1, - 0x32, 0x98, 0x0f, 0xdd, 0x4e, 0x9f, 0x08, 0x93, 0x19, 0x47, 0x52, 0xb3, 0xd6, 0x3a, 0x7a, 0xed, - 0x5a, 0x47, 0x71, 0x76, 0xed, 0x93, 0x30, 0x2f, 0xe3, 0x95, 0x40, 0x8d, 0x82, 0x63, 0x40, 0x65, - 0x55, 0x70, 0xf6, 0x37, 0x08, 0xe6, 0xc7, 0xf2, 0x85, 0x6d, 0x30, 0x3b, 0x4c, 0x95, 0x8a, 0xc3, - 0x35, 0x60, 0x38, 0xa8, 0x48, 0x8e, 0x23, 0xbf, 0x59, 0xf6, 0x49, 0x37, 0xe2, 0xb8, 0x27, 0x39, - 0xee, 0xcb, 0x23, 0xdc, 0x3f, 0xea, 0x46, 0xe1, 0x9e, 0x4a, 0xfe, 0x02, 0x43, 0x91, 0x35, 0x15, - 0x29, 0xee, 0xa8, 0x05, 0x3e,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 0x49, 0x7c, 0x0e, 0x8c, 0xed, 0x30, 0xf0, 0x67, 0x4a, 0x13, 0xd7, 0xc0, 0x6f, 0x41, - 0x32, 0x0a, 0x66, 0x4a, 0x52, 0x32, 0x0a, 0x58, 0x8e, 0xe4, 0xe1, 0x53, 0x3c, 0x38, 0x49, 0xd9, - 0x3f, 0x21, 0x58, 0x60, 0x3a, 0x02, 0x81, 0x4b, 0x3b, 0xfd, 0xee, 0x2e, 0xae, 0x41, 0x91, 0x79, - 0xba, 0xef, 0xc9, 0xb1, 0x76, 0xdf, 0x6b, 0xc9, 0x63, 0x16, 0x18, 0x5f, 0x4d, 0xbb, 0xcd, 0x16, - 0x5e, 0x81, 0xb9, 0x3e, 0x15, 0x02, 0xe2, 0xcc, 0x26, 0x23, 0x37, 0x5b, 0xf8, 0x94, 0xe6, 0x8e, - 0x61, 0xad, 0xbd, 0x99, 0x38, 0x86, 0x37, 0x5d, 0x2f, 0x8c, 0x7b, 0xcb, 0x49, 0x30, 0x9b, 0xcc, - 0xb1, 0xa8, 0x13, 0x36, 0x56, 0x63, 0x61, 0x1e, 0x90, 0x23, 0xb7, 0xed, 0xb7, 0x21, 0x1b, 0x6b, - 0x4f, 0x9d, 0xa6, 0x53, 0x33, 0x60, 0x5f, 0x84, 0x05, 0xd1, 0x33, 0xa7, 0x2b, 0xe7, 0xa7, 0x29, - 0xe7, 0x95, 0xf2, 0x11, 0x48, 0x0b, 0x54, 0x30, 0x18, 0x2d, 0x37, 0x72, 0x95, 0x0a, 0x5b, 0xdb, - 0x25, 0x58, 0xbe, 0x13, 0xba, 0x5d, 0xba, 0x4d, 0x42, 0x2e, 0x14, 0xd7, 0xae, 0x7d, 0x08, 0x16, - 0x59, 0x9f, 0x20, 0x21, 0xbd, 0x14, 0xf4, 0xbb, 0x91, 0xbc, 0x9e, 0xf6, 0x69, 0x58, 0x1a, 0x67, - 0xcb, 0x52, 0x5f, 0x82, 0x74, 0x93, 0x31, 0xb8, 0xf5, 0x79, 0x47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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, } func (x Direction) String() string { @@ -1741,6 +1819,14 @@ func (this *QueryRequest) Equal(that interface{}) bool { return false } } + if len(this.Deletes) != len(that1.Deletes) { + return false + } + for i := range this.Deletes { + if !this.Deletes[i].Equal(that1.Deletes[i]) { + return false + } + } return true } func (this *SampleQueryRequest) Equal(that interface{}) bool { @@ -1779,6 +1865,44 @@ func (this *SampleQueryRequest) Equal(that interface{}) bool { return false } } + if len(this.Deletes) != len(that1.Deletes) { + return false + } + for i := range this.Deletes { + if !this.Deletes[i].Equal(that1.Deletes[i]) { + return false + } + } + return true +} +func (this *Delete) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Delete) + if !ok { + that2, ok := that.(Delete) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Selector != that1.Selector { + return false + } + if this.Start != that1.Start { + return false + } + if this.End != that1.End { + return false + } return true } func (this *QueryResponse) Equal(that interface{}) bool { @@ -2538,7 +2662,7 @@ func (this *QueryRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) + s := make([]string, 0, 11) s = append(s, "&logproto.QueryRequest{") s = append(s, "Selector: "+fmt.Sprintf("%#v", this.Selector)+",\n") s = append(s, "Limit: "+fmt.Sprintf("%#v", this.Limit)+",\n") @@ -2546,6 +2670,9 @@ func (this *QueryRequest) GoString() string { s = append(s, "End: "+fmt.Sprintf("%#v", this.End)+",\n") s = append(s, "Direction: "+fmt.Sprintf("%#v", this.Direction)+",\n") s = append(s, "Shards: "+fmt.Sprintf("%#v", this.Shards)+",\n") + if this.Deletes != nil { + s = append(s, "Deletes: "+fmt.Sprintf("%#v", this.Deletes)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -2553,12 +2680,27 @@ func (this *SampleQueryRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&logproto.SampleQueryRequest{") s = append(s, "Selector: "+fmt.Sprintf("%#v", this.Selector)+",\n") s = append(s, "Start: "+fmt.Sprintf("%#v", this.Start)+",\n") s = append(s, "End: "+fmt.Sprintf("%#v", this.End)+",\n") s = append(s, "Shards: "+fmt.Sprintf("%#v", this.Shards)+",\n") + if this.Deletes != nil { + s = append(s, "Deletes: "+fmt.Sprintf("%#v", this.Deletes)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Delete) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&logproto.Delete{") + s = append(s, "Selector: "+fmt.Sprintf("%#v", this.Selector)+",\n") + s = append(s, "Start: "+fmt.Sprintf("%#v", this.Start)+",\n") + s = append(s, "End: "+fmt.Sprintf("%#v", this.End)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -3510,6 +3652,20 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Deletes) > 0 { + for iNdEx := len(m.Deletes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deletes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLogproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } if len(m.Shards) > 0 { for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Shards[iNdEx]) @@ -3575,6 +3731,20 @@ func (m *SampleQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Deletes) > 0 { + for iNdEx := len(m.Deletes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deletes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLogproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.Shards) > 0 { for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Shards[iNdEx]) @@ -3610,6 +3780,46 @@ func (m *SampleQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Delete) 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 *Delete) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.End != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x18 + } + if m.Start != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x10 + } + if len(m.Selector) > 0 { + i -= len(m.Selector) + copy(dAtA[i:], m.Selector) + i = encodeVarintLogproto(dAtA, i, uint64(len(m.Selector))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4666,6 +4876,12 @@ func (m *QueryRequest) Size() (n int) { n += 1 + l + sovLogproto(uint64(l)) } } + if len(m.Deletes) > 0 { + for _, e := range m.Deletes { + l = e.Size() + n += 1 + l + sovLogproto(uint64(l)) + } + } return n } @@ -4689,6 +4905,31 @@ func (m *SampleQueryRequest) Size() (n int) { n += 1 + l + sovLogproto(uint64(l)) } } + if len(m.Deletes) > 0 { + for _, e := range m.Deletes { + l = e.Size() + n += 1 + l + sovLogproto(uint64(l)) + } + } + return n +} + +func (m *Delete) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Selector) + if l > 0 { + n += 1 + l + sovLogproto(uint64(l)) + } + if m.Start != 0 { + n += 1 + sovLogproto(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovLogproto(uint64(m.End)) + } return n } @@ -5138,6 +5379,11 @@ func (this *QueryRequest) String() string { if this == nil { return "nil" } + repeatedStringForDeletes := "[]*Delete{" + for _, f := range this.Deletes { + repeatedStringForDeletes += strings.Replace(f.String(), "Delete", "Delete", 1) + "," + } + repeatedStringForDeletes += "}" s := strings.Join([]string{`&QueryRequest{`, `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, @@ -5145,6 +5391,7 @@ func (this *QueryRequest) String() string { `End:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.End), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Direction:` + fmt.Sprintf("%v", this.Direction) + `,`, `Shards:` + fmt.Sprintf("%v", this.Shards) + `,`, + `Deletes:` + repeatedStringForDeletes + `,`, `}`, }, "") return s @@ -5153,11 +5400,29 @@ func (this *SampleQueryRequest) String() string { if this == nil { return "nil" } + repeatedStringForDeletes := "[]*Delete{" + for _, f := range this.Deletes { + repeatedStringForDeletes += strings.Replace(f.String(), "Delete", "Delete", 1) + "," + } + repeatedStringForDeletes += "}" s := strings.Join([]string{`&SampleQueryRequest{`, `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, `Start:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Start), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `End:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.End), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Shards:` + fmt.Sprintf("%v", this.Shards) + `,`, + `Deletes:` + repeatedStringForDeletes + `,`, + `}`, + }, "") + return s +} +func (this *Delete) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Delete{`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `Start:` + fmt.Sprintf("%v", this.Start) + `,`, + `End:` + fmt.Sprintf("%v", this.End) + `,`, `}`, }, "") return s @@ -5814,6 +6079,40 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { } m.Shards = append(m.Shards, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deletes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deletes = append(m.Deletes, &Delete{}) + if err := m.Deletes[len(m.Deletes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) @@ -5997,6 +6296,163 @@ func (m *SampleQueryRequest) Unmarshal(dAtA []byte) error { } m.Shards = append(m.Shards, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deletes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deletes = append(m.Deletes, &Delete{}) + if err := m.Deletes[len(m.Deletes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 (m *Delete) 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: Delete: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delete: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", 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.Selector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) diff --git a/pkg/logproto/logproto.proto b/pkg/logproto/logproto.proto index 3ed992bdfe7e..7270601e2b75 100644 --- a/pkg/logproto/logproto.proto +++ b/pkg/logproto/logproto.proto @@ -41,6 +41,7 @@ message QueryRequest { Direction direction = 5; reserved 6; repeated string shards = 7 [(gogoproto.jsontag) = "shards,omitempty"]; + repeated Delete deletes = 8; } message SampleQueryRequest { @@ -48,6 +49,13 @@ message SampleQueryRequest { google.protobuf.Timestamp start = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp end = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; repeated string shards = 4 [(gogoproto.jsontag) = "shards,omitempty"]; + repeated Delete deletes = 5; +} + +message Delete { + string selector = 1; + int64 start = 2; + int64 end = 3; } message QueryResponse { diff --git a/pkg/loki/delete_store_listener.go b/pkg/loki/delete_store_listener.go new file mode 100644 index 000000000000..2a399603784c --- /dev/null +++ b/pkg/loki/delete_store_listener.go @@ -0,0 +1,48 @@ +package loki + +import ( + "github.com/grafana/dskit/services" + + "github.com/grafana/loki/pkg/storage/stores/shipper/compactor/deletion" +) + +func deleteRequestsStoreListener(d deletion.DeleteRequestsStore) *listener { + return &listener{d} +} + +type listener struct { + deleteRequestsStore deletion.DeleteRequestsStore +} + +// Starting is called when the service transitions from NEW to STARTING. +func (l *listener) Starting() {} + +// Running is called when the service transitions from STARTING to RUNNING. +func (l *listener) Running() {} + +// Stopping is called when the service transitions to the STOPPING state. +func (l *listener) Stopping(from services.State) { + if from == services.Stopping || from == services.Terminated || from == services.Failed { + // no need to do anything + return + } + l.deleteRequestsStore.Stop() +} + +// Terminated is called when the service transitions to the TERMINATED state. +func (l *listener) Terminated(from services.State) { + if from == services.Stopping || from == services.Terminated || from == services.Failed { + // no need to do anything + return + } + l.deleteRequestsStore.Stop() +} + +// Failed is called when the service transitions to the FAILED state. +func (l *listener) Failed(from services.State, failure error) { + if from == services.Stopping || from == services.Terminated || from == services.Failed { + // no need to do anything + return + } + l.deleteRequestsStore.Stop() +} diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index c17486dd41c4..ec729b6a306b 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -10,6 +10,8 @@ import ( "os" "time" + "github.com/grafana/loki/pkg/storage/stores/shipper/compactor/deletion" + "github.com/NYTimes/gziphandler" "github.com/go-kit/log" "github.com/go-kit/log/level" @@ -221,9 +223,12 @@ func (t *Loki) initQuerier() (services.Service, error) { // Querier worker's max concurrent requests must be the same as the querier setting t.Cfg.Worker.MaxConcurrentRequests = t.Cfg.Querier.MaxConcurrent - logger := log.With(util_log.Logger, "component", "querier") - var err error - q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.overrides) + deleteStore, err := t.deleteRequestsStore() + if err != nil { + return nil, err + } + + q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.overrides, deleteStore) if err != nil { return nil, err } @@ -249,6 +254,7 @@ func (t *Loki) initQuerier() (services.Service, error) { httpreq.ExtractQueryMetricsMiddleware(), ) + logger := log.With(util_log.Logger, "component", "querier") t.querierAPI = querier.NewQuerierAPI(t.Cfg.Querier, t.Querier, t.overrides, logger) queryHandlers := map[string]http.Handler{ "/loki/api/v1/query_range": httpMiddleware.Wrap(http.HandlerFunc(t.querierAPI.RangeQueryHandler)), @@ -278,9 +284,23 @@ func (t *Loki) initQuerier() (services.Service, error) { "/api/prom/tail": http.HandlerFunc(t.querierAPI.TailHandler), } - return querier.InitWorkerService( - querierWorkerServiceConfig, prometheus.DefaultRegisterer, queryHandlers, alwaysExternalHandlers, t.Server.HTTP, t.Server.HTTPServer.Handler, t.HTTPAuthMiddleware, + svc, err := querier.InitWorkerService( + querierWorkerServiceConfig, + prometheus.DefaultRegisterer, + queryHandlers, + alwaysExternalHandlers, + t.Server.HTTP, + t.Server.HTTPServer.Handler, + t.HTTPAuthMiddleware, ) + if err != nil { + return nil, err + } + + if svc != nil { + svc.AddListener(deleteRequestsStoreListener(deleteStore)) + } + return svc, nil } func (t *Loki) initIngester() (_ services.Service, err error) { @@ -625,7 +645,13 @@ func (t *Loki) initRuler() (_ services.Service, err error) { t.Cfg.Ruler.Ring.ListenPort = t.Cfg.Server.GRPCListenPort t.Cfg.Ruler.Ring.KVStore.MemberlistKV = t.MemberlistKV.GetMemberlistKV - q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.overrides) + + deleteStore, err := t.deleteRequestsStore() + if err != nil { + return nil, err + } + + q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.overrides, deleteStore) if err != nil { return nil, err } @@ -674,6 +700,7 @@ func (t *Loki) initRuler() (_ services.Service, err error) { t.Server.HTTP.Path("/loki/api/v1/rules/{namespace}/{groupName}").Methods("DELETE").Handler(t.HTTPAuthMiddleware.Wrap(http.HandlerFunc(t.rulerAPI.DeleteRuleGroup))) } + t.ruler.AddListener(deleteRequestsStoreListener(deleteStore)) return t.ruler, nil } @@ -791,6 +818,19 @@ func (t *Loki) initUsageReport() (services.Service, error) { return ur, nil } +func (t *Loki) deleteRequestsStore() (deletion.DeleteRequestsStore, error) { + deleteStore := deletion.NewNoOpDeleteRequestsStore() + if loki_storage.UsingBoltdbShipper(t.Cfg.SchemaConfig.Configs) { + indexClient, err := chunk_storage.NewIndexClient(shipper.BoltDBShipperType, t.Cfg.StorageConfig.Config, t.Cfg.SchemaConfig.SchemaConfig, t.overrides, prometheus.DefaultRegisterer) + if err != nil { + return nil, err + } + + deleteStore = deletion.NewDeleteStoreFromIndexClient(indexClient) + } + return deleteStore, nil +} + func calculateMaxLookBack(pc chunk.PeriodConfig, maxLookBackConfig, minDuration time.Duration) (time.Duration, error) { if pc.ObjectType != shipper.FilesystemObjectStoreType && maxLookBackConfig.Nanoseconds() != 0 { return 0, errors.New("it is an error to specify a non zero `query_store_max_look_back_period` value when using any object store other than `filesystem`") diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 90ed1d886a97..daf381fd786d 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -6,6 +6,8 @@ import ( "net/http" "time" + "github.com/grafana/loki/pkg/storage/stores/shipper/compactor/deletion" + "github.com/go-kit/log/level" "github.com/pkg/errors" "github.com/prometheus/common/model" @@ -86,18 +88,22 @@ type SingleTenantQuerier struct { store storage.Store limits *validation.Overrides ingesterQuerier *IngesterQuerier + deleteGetter deleteGetter +} + +type deleteGetter interface { + GetAllDeleteRequestsForUser(ctx context.Context, userID string) ([]deletion.DeleteRequest, error) } // New makes a new Querier. -func New(cfg Config, store storage.Store, ingesterQuerier *IngesterQuerier, limits *validation.Overrides) (*SingleTenantQuerier, error) { - querier := SingleTenantQuerier{ +func New(cfg Config, store storage.Store, ingesterQuerier *IngesterQuerier, limits *validation.Overrides, d deleteGetter) (*SingleTenantQuerier, error) { + return &SingleTenantQuerier{ cfg: cfg, store: store, ingesterQuerier: ingesterQuerier, limits: limits, - } - - return &querier, nil + deleteGetter: d, + }, nil } // Select Implements logql.Querier which select logs via matchers and regex filters. @@ -108,6 +114,11 @@ func (q *SingleTenantQuerier) SelectLogs(ctx context.Context, params logql.Selec return nil, err } + params.QueryRequest.Deletes, err = q.deletesForUser(ctx, params.Start, params.End) + if err != nil { + return nil, err + } + ingesterQueryInterval, storeQueryInterval := q.buildQueryIntervals(params.Start, params.End) iters := []iter.EntryIterator{} @@ -157,6 +168,11 @@ func (q *SingleTenantQuerier) SelectSamples(ctx context.Context, params logql.Se return nil, err } + params.SampleQueryRequest.Deletes, err = q.deletesForUser(ctx, params.Start, params.End) + if err != nil { + return nil, err + } + ingesterQueryInterval, storeQueryInterval := q.buildQueryIntervals(params.Start, params.End) iters := []iter.SampleIterator{} @@ -192,6 +208,36 @@ func (q *SingleTenantQuerier) SelectSamples(ctx context.Context, params logql.Se return iter.NewMergeSampleIterator(ctx, iters), nil } +func (q *SingleTenantQuerier) deletesForUser(ctx context.Context, startT, endT time.Time) ([]*logproto.Delete, error) { + userID, err := tenant.TenantID(ctx) + if err != nil { + return nil, err + } + + d, err := q.deleteGetter.GetAllDeleteRequestsForUser(ctx, userID) + if err != nil { + return nil, err + } + + start := startT.UnixNano() + end := endT.UnixNano() + + var deletes []*logproto.Delete + for _, del := range d { + if int64(del.StartTime) <= end && int64(del.EndTime) >= start { + for _, selector := range del.Selectors { + deletes = append(deletes, &logproto.Delete{ + Selector: selector, + Start: int64(del.StartTime), + End: int64(del.EndTime), + }) + } + } + } + + return deletes, nil +} + func (q *SingleTenantQuerier) buildQueryIntervals(queryStart, queryEnd time.Time) (*interval, *interval) { // limitQueryInterval is a flag for whether store queries should be limited to start time of ingester queries. limitQueryInterval := false diff --git a/pkg/querier/querier_mock_test.go b/pkg/querier/querier_mock_test.go index 3cf77b8a352f..b6250a41b7dd 100644 --- a/pkg/querier/querier_mock_test.go +++ b/pkg/querier/querier_mock_test.go @@ -43,6 +43,11 @@ func (c *querierClientMock) Query(ctx context.Context, in *logproto.QueryRequest return args.Get(0).(logproto.Querier_QueryClient), args.Error(1) } +func (c *querierClientMock) QuerySample(ctx context.Context, in *logproto.SampleQueryRequest, opts ...grpc.CallOption) (logproto.Querier_QuerySampleClient, error) { + args := c.Called(ctx, in, opts) + return args.Get(0).(logproto.Querier_QuerySampleClient), args.Error(1) +} + func (c *querierClientMock) Label(ctx context.Context, in *logproto.LabelRequest, opts ...grpc.CallOption) (*logproto.LabelResponse, error) { args := c.Called(ctx, in, opts) return args.Get(0).(*logproto.LabelResponse), args.Error(1) @@ -141,6 +146,49 @@ func (c *queryClientMock) Context() context.Context { return context.Background() } +// queryClientMock is a mockable version of Querier_QueryClient +type querySampleClientMock struct { + util.ExtendedMock + logproto.Querier_QueryClient +} + +func newQuerySampleClientMock() *querySampleClientMock { + return &querySampleClientMock{} +} + +func (c *querySampleClientMock) Recv() (*logproto.SampleQueryResponse, error) { + args := c.Called() + res := args.Get(0) + if res == nil { + return (*logproto.SampleQueryResponse)(nil), args.Error(1) + } + return res.(*logproto.SampleQueryResponse), args.Error(1) +} + +func (c *querySampleClientMock) Header() (grpc_metadata.MD, error) { + return nil, nil +} + +func (c *querySampleClientMock) Trailer() grpc_metadata.MD { + return nil +} + +func (c *querySampleClientMock) CloseSend() error { + return nil +} + +func (c *querySampleClientMock) SendMsg(m interface{}) error { + return nil +} + +func (c *querySampleClientMock) RecvMsg(m interface{}) error { + return nil +} + +func (c *querySampleClientMock) Context() context.Context { + return context.Background() +} + // tailClientMock is mockable version of Querier_TailClient type tailClientMock struct { util.ExtendedMock @@ -381,6 +429,13 @@ func mockStreamIterator(from int, quantity int) iter.EntryIterator { return iter.NewStreamIterator(mockStream(from, quantity)) } +// mockSampleIterator returns an iterator with 1 stream and quantity entries, +// where entries timestamp and line string are constructed as sequential numbers +// starting at from +func mockSampleIterator(client iter.QuerySampleClient) iter.SampleIterator { + return iter.NewSampleQueryClientIterator(client) +} + // mockStream return a stream with quantity entries, where entries timestamp and // line string are constructed as sequential numbers starting at from func mockStream(from int, quantity int) logproto.Stream { diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index 0990209f46e8..1cc677a20389 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -8,6 +8,8 @@ import ( "testing" "time" + "github.com/grafana/loki/pkg/storage/stores/shipper/compactor/deletion" + "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" @@ -30,14 +32,6 @@ const ( queryTimeout = 12 * time.Second ) -func newQuerier(cfg Config, clientCfg client.Config, clientFactory ring_client.PoolFactory, ring ring.ReadRing, store storage.Store, limits *validation.Overrides) (*SingleTenantQuerier, error) { - iq, err := newIngesterQuerier(clientCfg, ring, cfg.ExtraQueryDelay, clientFactory) - if err != nil { - return nil, err - } - return New(cfg, store, iq, limits) -} - func TestQuerier_Label_QueryTimeoutConfigFlag(t *testing.T) { startTime := time.Now().Add(-1 * time.Minute) endTime := time.Now() @@ -63,6 +57,7 @@ func TestQuerier_Label_QueryTimeoutConfigFlag(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), mockReadRingWithOneActiveIngester(), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -115,6 +110,7 @@ func TestQuerier_Tail_QueryTimeoutConfigFlag(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), mockReadRingWithOneActiveIngester(), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -197,6 +193,7 @@ func TestQuerier_validateQueryRequest(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), mockReadRingWithOneActiveIngester(), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -350,6 +347,7 @@ func TestQuerier_SeriesAPI(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), mockReadRingWithOneActiveIngester(), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -415,6 +413,7 @@ func TestQuerier_IngesterMaxQueryLookback(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), mockReadRingWithOneActiveIngester(), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -506,6 +505,7 @@ func TestQuerier_concurrentTailLimits(t *testing.T) { mockIngesterClientConfig(), newIngesterClientMockFactory(ingesterClient), newReadRingMock(testData.ringIngesters), + &mockDeleteGettter{}, store, limits) require.NoError(t, err) @@ -724,3 +724,144 @@ func Test_validateQueryTimeRangeLimits(t *testing.T) { }) } } + +func TestQuerier_SelectLogWithDeletes(t *testing.T) { + store := newStoreMock() + store.On("SelectLogs", mock.Anything, mock.Anything).Return(mockStreamIterator(1, 2), nil) + + queryClient := newQueryClientMock() + queryClient.On("Recv").Return(mockQueryResponse([]logproto.Stream{mockStream(1, 2)}), nil) + + ingesterClient := newQuerierClientMock() + ingesterClient.On("Query", mock.Anything, mock.Anything, mock.Anything).Return(queryClient, nil) + + limits, err := validation.NewOverrides(defaultLimitsTestConfig(), nil) + require.NoError(t, err) + + delGetter := &mockDeleteGettter{ + results: []deletion.DeleteRequest{ + {Selectors: []string{`0`}, StartTime: 0, EndTime: 100}, + {Selectors: []string{`1`}, StartTime: 200, EndTime: 400}, + {Selectors: []string{`2`}, StartTime: 400, EndTime: 500}, + {Selectors: []string{`3`}, StartTime: 500, EndTime: 700}, + {Selectors: []string{`4`}, StartTime: 700, EndTime: 900}, + }, + } + + q, err := newQuerier( + mockQuerierConfig(), + mockIngesterClientConfig(), + newIngesterClientMockFactory(ingesterClient), + mockReadRingWithOneActiveIngester(), + delGetter, store, limits) + require.NoError(t, err) + + ctx := user.InjectOrgID(context.Background(), "test") + + request := logproto.QueryRequest{ + Selector: `{type="test"} |= "foo"`, + Limit: 10, + Start: time.Unix(0, 300), + End: time.Unix(0, 600), + Direction: logproto.FORWARD, + } + + _, err = q.SelectLogs(ctx, logql.SelectLogParams{QueryRequest: &request}) + require.NoError(t, err) + + expectedRequest := &logproto.QueryRequest{ + Selector: request.Selector, + Limit: request.Limit, + Start: request.Start, + End: request.End, + Direction: request.Direction, + Deletes: []*logproto.Delete{ + {Selector: "1", Start: 200, End: 400}, + {Selector: "2", Start: 400, End: 500}, + {Selector: "3", Start: 500, End: 700}, + }, + } + + require.Contains(t, store.Calls[0].Arguments, logql.SelectLogParams{QueryRequest: expectedRequest}) + require.Contains(t, ingesterClient.Calls[0].Arguments, expectedRequest) + require.Equal(t, "test", delGetter.user) +} + +func TestQuerier_SelectSamplesWithDeletes(t *testing.T) { + queryClient := newQuerySampleClientMock() + queryClient.On("Recv").Return(mockQueryResponse([]logproto.Stream{mockStream(1, 2)}), nil) + + store := newStoreMock() + store.On("SelectSamples", mock.Anything, mock.Anything).Return(mockSampleIterator(queryClient), nil) + + ingesterClient := newQuerierClientMock() + ingesterClient.On("QuerySample", mock.Anything, mock.Anything, mock.Anything).Return(queryClient, nil) + + limits, err := validation.NewOverrides(defaultLimitsTestConfig(), nil) + require.NoError(t, err) + + delGetter := &mockDeleteGettter{ + results: []deletion.DeleteRequest{ + {Selectors: []string{`0`}, StartTime: 0, EndTime: 100}, + {Selectors: []string{`1`}, StartTime: 200, EndTime: 400}, + {Selectors: []string{`2`}, StartTime: 400, EndTime: 500}, + {Selectors: []string{`3`}, StartTime: 500, EndTime: 700}, + {Selectors: []string{`4`}, StartTime: 700, EndTime: 900}, + }, + } + + q, err := newQuerier( + mockQuerierConfig(), + mockIngesterClientConfig(), + newIngesterClientMockFactory(ingesterClient), + mockReadRingWithOneActiveIngester(), + delGetter, store, limits) + require.NoError(t, err) + + ctx := user.InjectOrgID(context.Background(), "test") + + request := logproto.SampleQueryRequest{ + Selector: `count_over_time({foo="bar"}[5m])`, + Start: time.Unix(0, 300), + End: time.Unix(0, 600), + } + + _, err = q.SelectSamples(ctx, logql.SelectSampleParams{SampleQueryRequest: &request}) + require.NoError(t, err) + + expectedRequest := logql.SelectSampleParams{ + SampleQueryRequest: &logproto.SampleQueryRequest{ + Selector: request.Selector, + Start: request.Start, + End: request.End, + Deletes: []*logproto.Delete{ + {Selector: "1", Start: 200, End: 400}, + {Selector: "2", Start: 400, End: 500}, + {Selector: "3", Start: 500, End: 700}, + }, + }, + } + + require.Contains(t, store.Calls[0].Arguments, expectedRequest) + require.Contains(t, ingesterClient.Calls[0].Arguments, expectedRequest.SampleQueryRequest) + require.Equal(t, "test", delGetter.user) +} + +func newQuerier(cfg Config, clientCfg client.Config, clientFactory ring_client.PoolFactory, ring ring.ReadRing, dg *mockDeleteGettter, store storage.Store, limits *validation.Overrides) (*SingleTenantQuerier, error) { + iq, err := newIngesterQuerier(clientCfg, ring, cfg.ExtraQueryDelay, clientFactory) + if err != nil { + return nil, err + } + + return New(cfg, store, iq, limits, dg) +} + +type mockDeleteGettter struct { + user string + results []deletion.DeleteRequest +} + +func (d *mockDeleteGettter) GetAllDeleteRequestsForUser(ctx context.Context, userID string) ([]deletion.DeleteRequest, error) { + d.user = userID + return d.results, nil +} diff --git a/pkg/storage/stores/shipper/compactor/deletion/delete_requests_store.go b/pkg/storage/stores/shipper/compactor/deletion/delete_requests_store.go index b14bdb3baef3..d46975a98063 100644 --- a/pkg/storage/stores/shipper/compactor/deletion/delete_requests_store.go +++ b/pkg/storage/stores/shipper/compactor/deletion/delete_requests_store.go @@ -63,6 +63,10 @@ func NewDeleteStore(workingDirectory string, indexStorageClient storage.Client) return &deleteRequestsStore{indexClient: indexClient}, nil } +func NewDeleteStoreFromIndexClient(ic chunk.IndexClient) DeleteRequestsStore { + return &deleteRequestsStore{ic} +} + func (ds *deleteRequestsStore) Stop() { ds.indexClient.Stop() } diff --git a/pkg/storage/stores/shipper/compactor/deletion/noop_delete_requests_store.go b/pkg/storage/stores/shipper/compactor/deletion/noop_delete_requests_store.go new file mode 100644 index 000000000000..168d5922f0c4 --- /dev/null +++ b/pkg/storage/stores/shipper/compactor/deletion/noop_delete_requests_store.go @@ -0,0 +1,39 @@ +package deletion + +import ( + "context" + + "github.com/prometheus/common/model" +) + +func NewNoOpDeleteRequestsStore() DeleteRequestsStore { + return &noOpDeleteRequestsStore{} +} + +type noOpDeleteRequestsStore struct{} + +func (d *noOpDeleteRequestsStore) AddDeleteRequest(ctx context.Context, userID string, startTime, endTime model.Time, selectors []string) error { + return nil +} + +func (d *noOpDeleteRequestsStore) GetDeleteRequestsByStatus(ctx context.Context, status DeleteRequestStatus) ([]DeleteRequest, error) { + return nil, nil +} + +func (d *noOpDeleteRequestsStore) GetAllDeleteRequestsForUser(ctx context.Context, userID string) ([]DeleteRequest, error) { + return nil, nil +} + +func (d *noOpDeleteRequestsStore) UpdateStatus(ctx context.Context, userID, requestID string, newStatus DeleteRequestStatus) error { + return nil +} + +func (d *noOpDeleteRequestsStore) GetDeleteRequest(ctx context.Context, userID, requestID string) (*DeleteRequest, error) { + return nil, nil +} + +func (d *noOpDeleteRequestsStore) RemoveDeleteRequest(ctx context.Context, userID, requestID string, createdAt, startTime, endTime model.Time) error { + return nil +} + +func (d *noOpDeleteRequestsStore) Stop() {}