-
Notifications
You must be signed in to change notification settings - Fork 848
When searching for an ingester to send chunks to, ensure we can actually connect to it. #1185
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
Conversation
|
Doesn't seem to fix it: |
|
Scratch that - never actually checking the err. Thats why late night friday coding is not a good idea. |
|
Yeah works nicely with this: |
|
Seems like this could create a future TOCTTOU issue. Why not look for another ingester if we get a failure to transfer? |
That issue already exists, right? This change slightly mitigates it, but I agree it is not perfect. We currently fallback to flushing, and I'd prefer to implement the "proper" migration ideas than drastically change the current approach, which I think it a bit of a dead end. |
Not the one I meant. Currently we pick an ingester based on the list in Consul and try to transfer, and if that fails we're done. There is no 'check' so no time-of-check issue. You think it's way more complicated to put a loop round the pick+transfer set? |
|
Ah okay I see, sorry. I'll see what a retry loop looks like. |
d1eb2ba to
a71fbad
Compare
|
@bboreham PTAL |
|
LGTM from me! |
bboreham
left a comment
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.
Couple of thoughts.
pkg/ingester/transfer.go
Outdated
| if time.Now().Before(deadline) { | ||
| time.Sleep(i.cfg.SearchPendingFor / pendingSearchIterations) | ||
| select { | ||
| case <-ticker.C: |
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.
If we have an outer loop doing retries, do we still want this inner loop?
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've also deprecated one of the flags that was used here (ingester.search-pending-for), which is replaced by ingester.max-transfer-retries. I made the max backoff 5s, so with 10 retries this should approximate the default 10s search time from the previous flag.
…lly connect to it. Signed-off-by: Tom Wilkie <[email protected]>
Signed-off-by: Tom Wilkie <[email protected]>
Signed-off-by: Tom Wilkie <[email protected]>
…don't timeout. Signed-off-by: Tom Wilkie <[email protected]>
… retry the transfer if they fail. Signed-off-by: Tom Wilkie <[email protected]>
Signed-off-by: Tom Wilkie <[email protected]>
a71fbad to
9c97fb0
Compare
|
PLEASE PUT FLAG MEANING CHANGES LOUDLY IN THE TITLE |
Fixes #1184
Signed-off-by: Tom Wilkie [email protected]