-
Notifications
You must be signed in to change notification settings - Fork 136
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
Enhancement: optimize guc mechanism #918
base: main
Are you sure you want to change the base?
Conversation
hi, what's the diff of unsync and undispatch ? |
Same question, when developers add a new GUC, which array should it be placed in? |
Caues it is ambiguous for GUC manage currently and it doesn't have unified standard, especially sync GUCs, unsync GUCs and Indeed, all GUC variables are divided into three categories now, sync GUC/unsync GUC/undispatch GUC. Any GUC is one of three types
At the same time, all GUC variables are placeed three files, all sync GUC variables put into sync_guc_name.h, all unsync GUC variables put into unsync_guc_name.h, all undispatch GUC variables put into undispatch_guc_name.h in init stage. When add a new GUC variable, it can assign one of GUC_GPDB_NEED_SYNC, GUC_GPDB_NO_SYNC, GUC_GPDB_NO_DISPATCH that corresponds to sync GUC or unsync GUC or undispatch GUC. If none of them is set, it will be treated as default unsync GUC. |
4700d7b
to
eb42dbb
Compare
What's meaning of the 'primary' here? primary nodes on segments? |
yes, 'primary' means segment node. It is also a dispatch when sync master with primary, only difference is that it will carry some GUC infomation(sync GUCs) when excute query. |
eb42dbb
to
0ebcc4b
Compare
Still confused, could you provide examples to show the differences, ex in a 3-segments cluster with mirror and standby each. And what's output of your new gpconfig -s gp_enable_global_deadlock_detector
Values on all segments are consistent
GUC : gp_enable_global_deadlock_detector
Coordinator value: off
Segment value: off Please make clear to each case, Coordinator value, Segment value, and ... perhaps your undisaptched? value? Again, I still don't know which array to put in when a new GUC added. |
Add new guc type Undispatch that doesn't dipatch from master to primary. for a guc, it's one of sync, unsync,undispatch.
0ebcc4b
to
f6197b3
Compare
Use undispatch GUC When set the GUC If the GUC Finally, for a new GUC added, you should decide to which type that new GUC belongs to firstly. Then |
That's a confusion, the undispatch GUC has the same output value on master and segments with unsync. |
No, the undispatch GUC has the diffrent output value on master and segments with unsync as above example. Also, gpconfig -s is a kind of static check method of current node, actually it doen't distinguish sync or unsync, you can choose a sync GUC and a unsync GUC. it has same output result. Only when we set GUC on Coordinator, Coordinator and Segment has diffrent state for diffrent GUC types, sync/unsync/undispatch |
We do it every day during develop, you break our common sense, try turn off optimizer to see the output. Still not clear what does undispatch mean. |
IMO, I think most developers do, unsync only take effects on master when exec a SET, while sync GUCs will dispatch to segments as well.And we use gpcondif -s to check the effect. And if you don't think it's right, please give a strong reason considering your new type undispatch. |
I make a summary. In a normal cluster, there are many segments , at the same time, there is a master node. When we set a GUC on the master, what changes in all QE processes. And SYNC GUC/UNSYNC GUC/UNDISPATCH GUC defines the action. For UNSYNC GUC, except QD process, it will be dispatched to all idle QE processes of all segments in current session. |
Add new guc type Undispatch that doesn't dipatch from master to primary. for a guc, it's one of sync, unsync,undispatch.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheck
make -C src/test installcheck-cbdb-parallel
Impact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions