-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
vtorc
: store cells in backend and periodically refresh
#17726
base: main
Are you sure you want to change the base?
vtorc
: store cells in backend and periodically refresh
#17726
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Tim Vaillancourt <[email protected]>
f02aca7
to
9f6620d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17726 +/- ##
==========================================
- Coverage 67.94% 67.94% -0.01%
==========================================
Files 1586 1587 +1
Lines 255173 255218 +45
==========================================
+ Hits 173389 173396 +7
- Misses 81784 81822 +38 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
This change could potentially be unsafe! If the user adds a cell and a tablet in that cell and runs a PRS to promote it. VTOrc might not see this new primary at all if all of this happened in the 15 seconds when the cell was added. VTOrc would end up then running a |
@GuptaManan100 good point! Hmm, I'll have to think if there's a safe way around this. Or maybe staleness in cells cannot be accepted 🤔 |
@GuptaManan100 I remembered you are working on a watch model for the global topo records; would moving this approach to a watch model help here? In theory there would still be a delay in responding to the watch connection update and updating the backend table. This would be likely < 100ms but you can't really put an SLA on it And a question: is VTOrc expected to be deployed in every cell? I think "no", but perhaps requiring a VTOrc in every cell in advance of tablets coming up would help work around some of this concern? In our production we run VTOrc in "a majority" of cells, not all |
@timvaillancourt I'm questioning the premise of this PR
Where are you seeing this? There are exactly two calls to
So I'm failing to see how this can be called more frequently than the ticker interval. To the second point
What is the resilience that is intended? If vtorc is unable to reach the global topo, it should error and not try to fix anything. |
Signed-off-by: Tim Vaillancourt <[email protected]>
@deepthi thanks for pointing this out, it appears I missed something when reading the code When an individual shard does a refresh it calls Now, Now that I'm aware forced shard refreshes happen using a different path, I updated the code to use cells from the backend in this scenario as well to demonstrate
Ideally a temporary problem accessing the global topo wouldn't stop VTOrc from solving problems in existing cells, but my main goal is to reduce duplicated topo calls when several recoveries occur; resilience is more of a side effect |
EDIT: nevermind 🤦. We need global topo locks 🤔 |
Description
This PR causes VTOrc to store a list of known cells in the backend and refresh them during the usual topo tick. This is called first by
OpenTabletDiscovery(...)
(viarefreshAllInformation(...)
) and later on a ticker loop (default every15s
). I think a small amount of drift in what cells are alive will be ok, for example if a shard refresh happens right after a cell is added/removed (cc @GuptaManan100?)Today the list of cells is refreshed every time time
refreshTabletsUsing(...)
is called, which can be more frequent than the ticker intervalThis should reduce global topo reads while adding some resilence if
ts.GetKnownCells(...)
fails temporarilyRelated Issue(s)
#17330
Checklist
Deployment Notes