When searching for an ingester to send chunks to, ensure we can actually connect to it.#1185
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! |
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.
If we have an outer loop doing retries, do we still want this inner loop?
There was a problem hiding this comment.
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 <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
…don't timeout. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
… retry the transfer if they fail. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
a71fbad to
9c97fb0
Compare
|
PLEASE PUT FLAG MEANING CHANGES LOUDLY IN THE TITLE |
Fixes #1184
Signed-off-by: Tom Wilkie tom.wilkie@gmail.com