-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat: start services after first heartbeat response processed #2424
feat: start services after first heartbeat response processed #2424
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2424 +/- ##
===========================================
- Coverage 77.72% 77.70% -0.03%
===========================================
Files 724 724
Lines 114092 114126 +34
===========================================
- Hits 88679 88676 -3
- Misses 25413 25450 +37 |
17faeef
to
0470e91
Compare
Will it encounter a readonly region error if we start services directly? |
0470e91
to
6eea7e9
Compare
I am afraid that may not be effective to blocking datanode from starting, because the route information of metasrv will guide the Frontend to access the datanode, and the Frontend will still encounter errors, but not |
|
The datanode must try its best to start and provide services properly at startup. If it can't for some reason (such as metasrv availability or network issues etc.), it can retry in the background. |
But my question is do we need to provide an explicit synchronous RPC for such requests or just wait for the first heartbeat response asynchronously in an implicit way? I think the former is better for understanding and debugging. |
I suggest going the full async way, and combining region's open/close state with table route. Like this:
The essential of this idea is fully reverse the region open/close management from "Datanode requests regions from Metasrv" to "regions are assigned to Datanode by Metasrv, dynamically". Also combining region open/close state with table route makes clients happy. |
23497d8
to
7b1c3ea
Compare
7b1c3ea
to
7ca6aeb
Compare
The |
…meTeam#2424) * feat: start services after first heartbeat response processed * refactor: watch changes in RegionAliveKeeper * feat: add coordination to DatanodeOptions * chore: apply suggestions from CR * chore: apply suggestions from CR * chore: enable coordination in sqlness
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Start services after the first heartbeat response is processed
Checklist
Refer to a related PR or issue link (optional)