Skip to content

Fix a bug in iterator deduplication logic - #984

Closed
arnikola wants to merge 1 commit into
masterfrom
arnikola/fix-panic
Closed

Fix a bug in iterator deduplication logic#984
arnikola wants to merge 1 commit into
masterfrom
arnikola/fix-panic

Conversation

@arnikola

Copy link
Copy Markdown
Collaborator

No description provided.

dedupeMap map[string]multiFetchResultSeries
iterators encoding.SeriesIterators
err xerrors.MultiError
dedupeFirstResolution time.Duration

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a major reason to change to resolution time.Duration instead of attrs storage.Attributes? They are both value types that shouldn't be able to be nil'd.

It's just I have an open PR that depends on having access to the attributes rather than just the resolution:
#908

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure, changed it since we were only using the resolution

@prateek

prateek commented Sep 29, 2018

Copy link
Copy Markdown
Collaborator

@arnikola need to rebase, master was broken until a little bit ago

err xerrors.MultiError
dedupeFirstAttrs storage.Attributes
dedupeMap map[string]multiFetchResultSeries
iterators encoding.SeriesIterators

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could you add test(s) to repro the bug fix


iters := iterators.Iters()
// Need to dedupe
iters := r.iterators.Iters()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah this was the bug?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, bad refactor somewhere along the line

@prateek

prateek commented Oct 3, 2018

Copy link
Copy Markdown
Collaborator

addressed in #989

@prateek prateek closed this Oct 3, 2018
@prateek
prateek deleted the arnikola/fix-panic branch October 3, 2018 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants