You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the DSIP and found no similar DSIP.
Motivation
After 2.0, DS will pre-assign the command into master slot. If the master's currentSlotIndex = id % slotSize, then the command will be assign to the master.
This can work well then the command id is auto increment with step 1, but in some scenarios, the step is not 1, e.g. in distributed table, the step might be table size.
If the t_ds_command is exist in two database, and we want to make sure the id will not conflict, we might set the step be 2.
Then the id in one database will be 1,3,5,7,9. the commands will always assign to master-01.
Then the cluster will have single-point problems.
Design Detail
We need to import a CommandFetcher to fetch command. In this case, we will use BY_ID strategy can set the step to 2.
command-fetch-strategy:
type: ID_SLOT_BASEDconfig:
# The incremental id stepid-step: 1# master fetch command numfetch-size: 10
the commands which (id / step) % slotSize = currentSlotIndex will be fetched by the CommandFetcher.
Search before asking
Motivation
After 2.0, DS will pre-assign the command into master slot. If the master's currentSlotIndex = id % slotSize, then the command will be assign to the master.
This can work well then the command id is auto increment with step 1, but in some scenarios, the step is not 1, e.g. in distributed table, the step might be table size.
If the t_ds_command is exist in two database, and we want to make sure the id will not conflict, we might set the step be 2.
Then the id in one database will be 1,3,5,7,9. the commands will always assign to master-01.
Then the cluster will have single-point problems.
Design Detail
We need to import a CommandFetcher to fetch command. In this case, we will use BY_ID strategy can set the step to 2.
the commands which (id / step) % slotSize = currentSlotIndex will be fetched by the CommandFetcher.
Compatibility, Deprecation, and Migration Plan
Compatibility with latest version
Test Plan
Test by UT and E2E
Code of Conduct
The text was updated successfully, but these errors were encountered: