Shard Assignments Rollout Strategy

shard_assignments_rollout_strategy.tsx

Things to do:

  • Make a way for all shard assignment accessor callsites to use the MySQL op accessor (by default). For specific callsites, we’ll swap out the underlying op being used to a different op. Test this out with a different op.
  • Write a schema for the rollout. Probably looks something like this: { "defaultStrategy": … (as above) "overrides": [ {"callSites": [...], "strategy": … (as above)} ] }
  • And the strategy looks something like this
    • We probably start out with LEGACY: 1 and everything else 0. In a follow-up PR, we make the default to PRIMARY: 1 and LEGACY: 0. After that, we introduce the replica fallback options.
          {
              PRIMARY: 95,
              QUERY_BOTH_AND_COMPARE: 4,
              READ_REPLICA_FALLBACK: 1,
              LEGACY: 1
          }
  • Also need to make an admin flag for the rollout.
  • Need the new shard assignments accessor to be able to access both the async op accessor and the basic shard assignments accessor.
  • Get feedback from Keunwoo once I’ve made the first version of this change.
  • Add tests that check whether the strategy is correctly detected and implemented on by the accessor.

Created from: Airtable diary: 04-13-22 202204131151


uid: 202204131351] tags: #airtable


Date
February 22, 2023