Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Issue #397 #398

Merged
merged 5 commits into from
Nov 17, 2016
Merged

Issue #397 #398

merged 5 commits into from
Nov 17, 2016

Conversation

Dieterbe
Copy link
Contributor

No description provided.

so that the caller knows what's going on.
Also, no point adding an entry into ES or cassandra if it failed to add
into the memory index
otherwise we accidentally add defs to DefsById and Add() will
always think it's already in the tree even when it's not.
So when you then remove the cause of a metricdef not being able
to go into the tree as in #397, it would no longer add it.

This also changes the behavior of the idx.memory.fail metric:
it will now keep triggering for every attempt to add to the
index which fails.  This is more accurate.

fix #397 - fix #399
// by deleting one or more nodes in the tree, any defs that previously failed may now
// be able to be added. An easy way to support this is just reset this map and give them
// all a chance again
m.FailedDefs = make(map[string]error)
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure this is the best approach. Ideally in future we will expose the Delete API to users. On a large multi tenant system we could potentially see a steady stream of deletes coming in.

But with that said, i dont have a better suggestion and this certainly solves the problem we have today.

@Dieterbe
Copy link
Contributor Author

i just manually did the experiment of #397 again and can confirm it works now.

@Dieterbe Dieterbe merged commit a036c09 into master Nov 17, 2016
@Dieterbe Dieterbe deleted the issue-397 branch December 15, 2017 22:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants