Skip to content

Comments

vttablet: trigger rolling restart when storage size changes#742

Merged
nickvanw merged 1 commit intoplanetscale:mainfrom
GenLN:vttablet-storage-resize-restart
Feb 11, 2026
Merged

vttablet: trigger rolling restart when storage size changes#742
nickvanw merged 1 commit intoplanetscale:mainfrom
GenLN:vttablet-storage-resize-restart

Conversation

@GenLN
Copy link
Contributor

@GenLN GenLN commented Jan 26, 2026

Description

Currently, when a user increases the storage size in the dataVolumeClaimTemplate of a VitessCluster CRD, the operator correctly updates the underlying PVC, but it does not trigger a rolling restart of the vttablet pods.

In many Kubernetes environments and storage classes, a pod restart is required for the file system to recognize the new capacity of the volume. Without this restart, the MySQL process inside vttablet might continue to see the old disk size.

Changes

  • Added AddString method to pkg/operator/desiredstatehash/desiredstatehash.go to allow hashing of simple string values.
  • Updated pkg/operator/vttablet/pod.go to include the storage request size from DataVolumePVCSpec in the tablet's desired state hash.

This change ensures that whenever the storage size is modified, the operator will perform a safe rolling restart (using the standard Vitess drain logic) to apply the changes.

Signed-off-by: genln <jelica.josip@gmail.com>
Copy link
Collaborator

@mattlord mattlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @GenLN ! ❤️

@nickvanw nickvanw merged commit 26d9e4d into planetscale:main Feb 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants