Do not use base58 encoded keys in db #629

Open
opened 2023-08-21 14:11:58 +00:00 by fyrchik · 1 comment
Owner

addr.EncodeToString(), oid.EncodeToString() etc.

We convert them to string and then to bytes (because, bbolt.Bucket.Put expects bytes).
They are also not fixed-size (or, at least it is not obvious for base58)

addr.Encode does no base58 encoding and encodes address in 64 bytes.
Depending on how we do this, we may also need a migration script.

`addr.EncodeToString()`, `oid.EncodeToString()` etc. We convert them to string and then to bytes (because, `bbolt.Bucket.Put` expects bytes). They are also not fixed-size (or, at least it is not obvious for base58) `addr.Encode` does no base58 encoding and encodes address in 64 bytes. Depending on how we do this, we may also need a migration script.
fyrchik added this to the vNext milestone 2023-08-21 14:11:58 +00:00
fyrchik added the
frostfs-node
triage
labels 2023-08-21 14:11:58 +00:00
fyrchik changed title from Do not use string encoded keys in db to Do not use base58 encoded keys in db 2023-08-21 14:12:06 +00:00
Author
Owner

For metabase this was done in ae1dab29bc.
I suggest to do the same thing for blobovnicza:

  1. All keys in new blobovniczas use binary encoding.
  2. During Open() we check whether blobovnicza uses old or new format, Blobovniza struct has func fields for (de-)constructing keys.
  3. Rebuild does the background migration -- * may not worth the effort.
For metabase this was done in ae1dab29bc1cd8946cc2b520470964d1b2b32df1. I suggest to do the same thing for blobovnicza: 1. All keys in new blobovniczas use binary encoding. 2. During `Open()` we check whether blobovnicza uses old or new format, `Blobovniza` struct has func fields for (de-)constructing keys. 3. `Rebuild` does the background migration -- * may not worth the effort.
fyrchik added the
discussion
label 2025-04-14 16:28:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#629
No description provided.