Skip to content

Commit

Permalink
Merge pull request #131279 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-24.2-131208

release-24.2: sql/catalog/bootstrap: don't call PrefixEnd on tenant start key
  • Loading branch information
stevendanna authored Oct 17, 2024
2 parents b363f92 + ac7713c commit 753b43b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/catalog/bootstrap/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func TestRoundTripInitialValuesStringRepresentation(t *testing.T) {
roundTripInitialValuesStringRepresentation(t, 0 /* tenantID */)
})
t.Run("tenant", func(t *testing.T) {
const dummyTenantID = 54321
const dummyTenantID = 109
roundTripInitialValuesStringRepresentation(t, dummyTenantID)
})
t.Run("tenants", func(t *testing.T) {
const dummyTenantID1, dummyTenantID2 = 54321, 12345
const dummyTenantID1, dummyTenantID2 = 109, 255
require.Equal(t,
InitialValuesToString(makeMetadataSchema(dummyTenantID1)),
InitialValuesToString(makeMetadataSchema(dummyTenantID2)),
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/catalog/bootstrap/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func InitialValuesFromString(
}
// Add back the filtered out tenant end key.
if !codec.ForSystemTenant() {
splits = append(splits, roachpb.RKey(p.PrefixEnd()))
splits = append(splits, roachpb.RKey(codec.TenantEndKey()))
}
return kvs, splits, nil
}
Expand Down

0 comments on commit 753b43b

Please sign in to comment.