Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a ChunkRef type as part of logproto #5643

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/migrate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
99 changes: 50 additions & 49 deletions pkg/ingester/client/ingester.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/ingester/client/ingester.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package ingesterpb;

option go_package = "client";
option go_package = "github.com/grafana/loki/pkg/ingester/client";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the full go path to the package rather than just client


import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "pkg/logproto/metrics.proto";
Expand Down
4 changes: 2 additions & 2 deletions pkg/ingester/flush_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
Loading