Description
Currently the way we do failover, we grab the config multiple times at different points in time, and we also grab different type of config separately(cluster config vs bucket config):
Specifically:
1) In failover:failover() we failover the collections for unsafe failover, and we grab the bucket config directly for this function.
2) We prepare the failover parameters in failover_buckets_prep(), we grab the bucket config separately for this function.
3)We do validate_services_safety() in which we grab the cluster membership config separately for this function.
4) In failover_service_nodes() we grab the cluster membership config again for reading, and then write the service_map related config.
5) We then failover the buckets in which we write the bucket config.
We should consider combining these into a single transaction. All the stateless checks can just happen as part of the transaction from the Snapshot of the transaction, and the service failover and bucket failover writes would happen as part of the transaction as well. Need to explore that path further to see how feasible it is, so creating this ticket for that.
Attachments
Gerrit Reviews
For Gerrit Dashboard: MB-59864 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
200883,11 | MB-59864: Update failover to operate on single snapshot | master | ns_server | Status: ABANDONED | 0 | +1 |
202397,6 | MB-59864: Combine failover reads/writes/safety checks into transaction | master | ns_server | Status: ABANDONED | 0 | +1 |
203553,7 | MB-59864: Update failover to operate on single snapshot | trinity | ns_server | Status: MERGED | +2 | +1 |
203554,8 | MB-59864: Combine failover reads/writes/safety checks into transaction | trinity | ns_server | Status: MERGED | +2 | +1 |
205360,2 | Merge remote-tracking branch 'couchbase/trinity' | master | ns_server | Status: MERGED | +2 | +1 |