Skip to content
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

chore: factor out rdb_load utilities into separate files #4315

Merged
merged 2 commits into from
Dec 16, 2024
Merged

chore: factor out rdb_load utilities into separate files #4315

merged 2 commits into from
Dec 16, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Dec 16, 2024

rdb_load.cc is huge and contains many auxillary classes. This PR moves DecompressImpl and ErrorRdb code into detail/

It also fixes minor bugs around error conditions with de-compression: a. Do not check-fail on invalid opcode and return error_code instead. b. Print correctly LZ4 errors.

rdb_load.cc is huge and contains many auxillary classes.
This PR moves DecompressImpl and ErrorRdb code into detail/

It also fixes minor bugs around error conditions with de-compression:
a. Do not check-fail on invalid opcode and return error_code instead.
b. Print correctly LZ4 errors.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange requested review from adiholden, dranikpg and chakaz and removed request for dranikpg December 16, 2024 05:56
Copy link
Collaborator

@chakaz chakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement! Please see some nits


namespace dfly {

namespace detail {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd even move this to core/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could, but I think at this time it does not really matter.

src/server/detail/decompress.h Outdated Show resolved Hide resolved
@romange romange requested a review from chakaz December 16, 2024 08:40
@romange romange enabled auto-merge (squash) December 16, 2024 08:45
@romange romange merged commit 53d6b64 into main Dec 16, 2024
9 checks passed
@romange romange deleted the Pr2 branch December 16, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants