Skip to content

Commit 3bf58af

Browse files
committed
WIP shorten delimiter
Signed-off-by: Leonard Lyubich <[email protected]>
1 parent baf055c commit 3bf58af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/local_object_storage/metabase/metadata_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ import (
2323
func assertAttrPrefixed[T string | []byte](t testing.TB, mb *bbolt.Bucket, id oid.ID, prefix byte, attr string, val T) {
2424
k := []byte{prefix}
2525
k = append(k, attr...)
26-
k = append(k, "\xc0\x80"...)
26+
k = append(k, 0xFF)
2727
k = append(k, val...)
28-
k = append(k, "\xc0\x80"...)
28+
k = append(k, 0xFF)
2929
k = append(k, id[:]...)
3030
require.Equal(t, []byte{}, mb.Get(k))
3131
k = []byte{0x03}
3232
k = append(k, id[:]...)
3333
k = append(k, attr...)
34-
k = append(k, "\xc0\x80"...)
34+
k = append(k, 0xFF)
3535
k = append(k, val...)
3636
require.Equal(t, []byte{}, mb.Get(k))
3737
}

pkg/local_object_storage/metabase/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
// UTF-8 data separator used in DB.
16-
var utf8Delimiter = []byte("\xc0\x80") // U+0000
16+
var utf8Delimiter = []byte{0xFF}
1717

1818
var (
1919
// graveyardBucketName stores rows with the objects that have been

0 commit comments

Comments
 (0)