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

Coordinator multi-fetch fixes #989

Merged
merged 2 commits into from
Sep 30, 2018
Merged

Conversation

prateek
Copy link
Collaborator

@prateek prateek commented Sep 30, 2018

No description provided.

@prateek prateek force-pushed the prateek/coordinator-panic-fixes branch from 832cfba to 21cefe2 Compare September 30, 2018 02:14
@prateek prateek force-pushed the prateek/coordinator-panic-fixes branch from 21cefe2 to f88d7b9 Compare September 30, 2018 02:18

for _, iter := range iters {
id := iter.ID().String()
r.dedupeMap[id] = append(r.dedupeMap[id], multiResultSeries{
Copy link
Contributor

Choose a reason for hiding this comment

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

Cant this panic if the exiting value is a nil slice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

talked offline, appending to nil slice is kosher

Copy link
Collaborator

Choose a reason for hiding this comment

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

We're always going to alloc a map and an array per entry in the map now?

if exists && existing.attrs.Resolution <= attrs.Resolution {
// Already exists and resolution of result we are adding is not as precise
func (r *multiResult) dedupe() {
for id, serieses := range r.dedupeMap {
Copy link
Contributor

Choose a reason for hiding this comment

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

serieses --> seriesList or something

return nil, noop, fmt.Errorf("no namespaces configured")
}

pools, err := namespaces[0].Session().IteratorPools()
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe leave a todo to find a way where we're not always ignoring pools from the other namespaces

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

talked offline, will comeback for this.

Copy link
Contributor

@richardartoul richardartoul left a comment

Choose a reason for hiding this comment

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

LGTM

@prateek prateek merged commit 22b0b4c into master Sep 30, 2018
@prateek prateek deleted the prateek/coordinator-panic-fixes branch September 30, 2018 03:58
attrs: r.dedupeFirstAttrs,
}
}
r.dedupeMap = make(map[string][]multiResultSeries, len(iters))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm now we are always going to be making the dedupe map (regardless of if we only hit a single namespace)?

@robskillington
Copy link
Collaborator

Thanks for fixing this, I should have had better tests to catch this.

Ignore the comments I posted, I can revisit the perf, to avoid de-dupe map if we don't need it, etc.

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