[Feature flag] Enable transactions for `objectpool.Disconnect()` operation
What
Enable the :gitaly_transactional_alternates_disconnect
feature flag which enables transactions for the objectpool.Disconnect()
operation.
Owners
- Team: Gitaly
- Most appropriate slack channel to reach out to:
#g_gitaly
- Best individual to reach out to: @justintobler
Expectations
What release does this feature occur in first?
What are we expecting to happen?
When this feature flag is enabled, the DisconnectGitAlternates
RPC enables transactions. The objectpool.Disconnect()
function is now transaction aware and casts several votes throughout the operation to ensure consistency among repository replicas. When the RPC is invoked through Gitaly cluster, if quorum is not achieved among repository replicas, we expect the RPC to fail. No change in behavior is expected for standalone Gitaly deployments since transactions are not injected into the RPC context. Functionally the main RPC operation being performed (object pool disconnection) remains the same for both Gitaly and Gitaly cluster.
What might happen if this goes wrong?
If there is an issue with transactions achieving quorum, this RPC will not succeed. This could result is repositories not being able to disconnect from object pools.
What can we monitor to detect problems with this?
We should monitor the DisconnectGitAlternates
RPC
Roll Out Steps
-
Enable on staging -
Is the required code deployed on staging? (howto) -
Enable on staging (howto) -
Add featureflagstaging to this issue (howto) -
Test on staging (howto) -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Enable on production -
Is the required code deployed on production? (howto) -
Progressively enable in production (howto) -
Add featureflagproduction to this issue -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Default-enable the feature flag (optional, only required if backwards-compatibility concerns exist) -
Wait for release containg default-disabled feature flag. -
Change the feature flag to default-enabled (howto) -
Wait for release containing default-enabled feature flag.
-
-
Remove feature flag
Please refer to the documentation of feature flags for further information.