Skip to content

Commit f66c146

Browse files
authored
Merge pull request #724 from planetscale/florent-add-comment-about-hex-width
add a warning in the CRD about hex width
2 parents c71874d + 7fc3591 commit f66c146

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docs/api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5814,6 +5814,11 @@ int32
58145814
<td>
58155815
<p>HexWidth is the number of hex characters to use for the shard range start and end.
58165816
If not set or set to 0, it will be automatically computed based on the number of requested shards.</p>
5817+
<p>WARNING: DO NOT change the hex width in a partitioning after deploying.
5818+
That&rsquo;s effectively deleting the old partitioning and adding a new one,
5819+
which can lead to downtime or data loss. Instead, add an additional
5820+
partitioning with the desired hex width, perform a resharding
5821+
migration, and then remove the old partitioning.</p>
58175822
</td>
58185823
</tr>
58195824
<tr>

docs/api/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5816,6 +5816,11 @@ <h3 id="planetscale.com/v2.VitessKeyspaceEqualPartitioning">VitessKeyspaceEqualP
58165816
<td>
58175817
<p>HexWidth is the number of hex characters to use for the shard range start and end.
58185818
If not set or set to 0, it will be automatically computed based on the number of requested shards.</p>
5819+
<p>WARNING: DO NOT change the hex width in a partitioning after deploying.
5820+
That&rsquo;s effectively deleting the old partitioning and adding a new one,
5821+
which can lead to downtime or data loss. Instead, add an additional
5822+
partitioning with the desired hex width, perform a resharding
5823+
migration, and then remove the old partitioning.</p>
58195824
</td>
58205825
</tr>
58215826
<tr>

pkg/apis/planetscale/v2/vitesskeyspace_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ type VitessKeyspaceEqualPartitioning struct {
359359

360360
// HexWidth is the number of hex characters to use for the shard range start and end.
361361
// If not set or set to 0, it will be automatically computed based on the number of requested shards.
362+
//
363+
// WARNING: DO NOT change the hex width in a partitioning after deploying.
364+
// That's effectively deleting the old partitioning and adding a new one,
365+
// which can lead to downtime or data loss. Instead, add an additional
366+
// partitioning with the desired hex width, perform a resharding
367+
// migration, and then remove the old partitioning.
368+
//
362369
// +kubebuilder:default=0
363370
// +kubebuilder:validation:Minimum=0
364371
// +kubebuilder:validation:Maximum=65536

0 commit comments

Comments
 (0)