-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blobstor: drop the last prm and res #3039
Conversation
3611930
to
7c842b9
Compare
Buggy, to be fixed.
|
1566328
to
c0d303c
Compare
if !prm.DontCompress { | ||
prm.RawData = t.Compress(prm.RawData) | ||
} | ||
prm.RawData = t.Compress(prm.RawData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, a confusing change imo. suggest renaming to CompressIfEnabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the way it's named now, I'd not bother.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previously it was near if !prm.DontCompress {
, now it just always compresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That didn't change anything in fact, prm.DontCompress
was an external signal, while t.Compress
can always do whatever it wants to internally.
One thing that bugs me is that our blobstor
is not really a BLOB storage system, it handles compression at the storage level (why?), it deals with objects for whatever reason. Would be much nicer to see some []byte
in/out here and handle compression at engine level. But that's all a different story.
At the substorage-level we don't need IDs, at the blobstor level we still do. Signed-off-by: Roman Khimov <[email protected]>
Simplify interfaces. Signed-off-by: Roman Khimov <[email protected]>
Get() is an object-based interface, while GetBytes() is for raw data. Signed-off-by: Roman Khimov <[email protected]>
It's easier this way. Signed-off-by: Roman Khimov <[email protected]>
This splits the lazy interface in a separate method, but otherwise works the same. Signed-off-by: Roman Khimov <[email protected]>
No one cares about it, dropping it simplifies refactoring. Signed-off-by: Roman Khimov <[email protected]>
Storage IDs make zero sense at the fstree/peapod level, so they're ommitted there and otherwise the behavior is preserved. Blobstor also currently accepts object structures, although it may not really care about them. Signed-off-by: Roman Khimov <[email protected]>
No reason for it to be a function. Signed-off-by: Roman Khimov <[email protected]>
I believe this bug was introduced right with 7df5029, this code is a straight copy-paste from bbcz, but bbcz operates in a callback, so it must return anyway and if errorHandler returns non-nil value is stops the iteration. In FSTree this leads to iteration stopping in any event if errorHandler is invoked and this shouldn't be the case. Signed-off-by: Roman Khimov <[email protected]>
Which simplifies things a bit for external users. If errorHandler is not specified any errors are returned as is, if it is it's up to handler to decide. Signed-off-by: Roman Khimov <[email protected]>
Address decoding error can lead to incorrect address (non-null) being passed to errorHandler. It's safer to have more narrow scope for addr. Signed-off-by: Roman Khimov <[email protected]>
Object getter callback is useless for FSTree and a bit more efficient for Peapod. But the only user of this interface is writecache which only uses it with FSTree, so some deduplication can be helpful. Signed-off-by: Roman Khimov <[email protected]>
Fix resynchronization failure: 2024/12/02 20:01:33 init shard CAXqYYjUEAbdr8gcLFgrpa: could not initialize *shard.metabaseSynchronizer: could not put objects to the meta from blobstor: blobstor iterator failure: exec read-only BoltDB transaction: logical error: no split info on parent object In general, exists() call shouldn't affect Put() much. Signed-off-by: Roman Khimov <[email protected]>
c0d303c
to
d788198
Compare
No description provided.