-
Notifications
You must be signed in to change notification settings - Fork 73
Fix backwards compatibility with block version 1 #802
Fix backwards compatibility with block version 1 #802
Conversation
This also adds a Test for block version compatibility.
Did you figure why it broke ? |
joinIters []query.Iterator | ||
) | ||
|
||
if b.meta.Version >= 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I want to include total sample in v2 WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really throw around with versions and make that version+1, also the sorted should be a version+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
case uint32: | ||
return int64(i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem #2, panic with uint32s
) | ||
|
||
if b.meta.Version >= 2 { | ||
joinIters = []query.Iterator{ | ||
b.profiles.columnIter(ctx, "SeriesIndex", newMapPredicate(lblsPerRef), "SeriesIndex"), | ||
b.profiles.columnIter(ctx, "TimeNanos", query.NewIntBetweenPredicate(model.Time(params.Start).UnixNano(), model.Time(params.End).UnixNano()), "TimeNanos"), | ||
b.profiles.columnIter(ctx, "StacktracePartition", nil, "StacktracePartition"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem #1: This requires the column to be there, maybe should have a orNull predicate or something.
This also adds a Test for block version compatibility.
#767 broke compatibility with version 1 blocks, this fixes the two issues and also adds sample blocks and tests to ensure compatibility.