Skip to content

Commit

Permalink
alternator: change default write isolation to only_rmw_uses_lwt
Browse files Browse the repository at this point in the history
"always" is too restrictive and too slow to be a good default.
  • Loading branch information
zimnx committed Dec 1, 2020
1 parent cb144b2 commit 9446bf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/api/v1alpha1/cluster_webhook.go
Expand Up @@ -39,10 +39,16 @@ func (r *ScyllaCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
var _ webhook.Defaulter = &ScyllaCluster{}
var _ webhook.Validator = &ScyllaCluster{}

const (
AlternatorWriteIsolationAlways = "always"
AlternatorWriteIsolationForbidRMW = "forbid_rmw"
AlternatorWriteIsolationOnlyRMWUsesLWT = "only_rmw_uses_lwt"
)

func (c *ScyllaCluster) Default() {
if c.Spec.Alternator != nil {
if c.Spec.Alternator.WriteIsolation == "" {
c.Spec.Alternator.WriteIsolation = "always"
c.Spec.Alternator.WriteIsolation = AlternatorWriteIsolationOnlyRMWUsesLWT
}
}

Expand Down

0 comments on commit 9446bf9

Please sign in to comment.