Repository navigation
Change the implementation of Admin#getServerNodes() to support carrying ServerTag - #1410
Conversation
d88c76c to
434a4f4
Compare
0d200dc to
9b78153
Compare
fe81060 to
0277461
Compare
9f20735 to
6cd606e
Compare
affo
left a comment
There was a problem hiding this comment.
Just a doubt about adding a blocking call to ZK
| metadataCache.getAllAliveTabletServers(listenerName).values(); | ||
| Set<ServerNode> aliveTabletServersWithTag = new HashSet<>(aliveTabletServers.size()); | ||
| try { | ||
| Optional<ServerTags> serverTagsOp = zkClient.getServerTags(); |
There was a problem hiding this comment.
Why not getting this out of the existing CoordinatorMetadataCache?
It would avoid a blocking call and fetch directly from memory.
|
Thanks @LiebingYu for the work 👍 can you please rebase the branch.. and a few more thoughts:
|
|
@LiebingYu are you still working on this one? |
02b0b44 to
4fb764d
Compare
fresh-borzoni
left a comment
There was a problem hiding this comment.
Found one gap while testing this: if you tag a server and then stop it, list_server_tag doesn't show it anymore, even though the tag is still in ZK. That's pretty much the normal decommission flow (tag -> rebalance -> stop), so the leftover tag just becomes invisible.
I don't think getServerNodes() can fix this nicely, since the coordinator forgets the server's address once it's down. Maybe a small listServerTags() that returns tags by server id, and an alive column in the procedure?
I know #1389 wanted to avoid a separate tags API, but I don't think stopped servers came up there.
The rest seems fine and LGTM in general
|
Thank you @fresh-borzoni for catching this. @LiebingYu I pushed some commits myself to help unblock the work.. I'm merging this for now, @affo do you want to handle the follow-up on what Anton mentioned? |
|
@polyzos @LiebingYu @affo So let's just continue work, and address the gap when it's needed, which I don't see as a blocker for FIP-41. |
|
Hi, @polyzos Could we address one availability regression in a follow-up PR:#4873?
We can reuse the existing
This gives the query the existing recovery behavior: a retriable failure triggers a metadata refresh, followed by one retry against the updated coordinator address. Please also add a regression test that reuses the same Admin instance, makes the old coordinator unavailable, and has the metadata response advertise a new coordinator. The query should recover automatically and return the expected nodes and tags without requiring an explicit metadata refresh from the caller. |
|
@swuferhong Thanks for the detailed breakdown 👍 |
@fresh-borzoni yes yes, that's why I was following this PR closely, as it made the trick without a new endpoint 🤝 |
Purpose
Linked issue: close #1389
Brief change log
Tests
API and Format
Documentation