Skip to content

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented Oct 8, 2025

You'll notice it has the same interface as #5889.

Doesn't have to be perfect or efficient, it's the first version of it. Just to exist and not be too much code at once

Signed-off-by: Vladislav Oleshko <[email protected]>
@dranikpg dranikpg marked this pull request as ready for review October 13, 2025 18:18
@dranikpg dranikpg requested a review from BorysTheDev October 13, 2025 18:18
namespace dfly::tiering {

SerializedMap::Iterator& SerializedMap::Iterator::operator++() {
slice_.remove_prefix(8 + key_.size() + value_.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

please add constexpr for 8

return;

uint32_t key_len = absl::little_endian::Load32(slice_.data());
uint32_t value_len = absl::little_endian::Load32(slice_.data() + 4);
Copy link
Contributor

Choose a reason for hiding this comment

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

please give name to 4

BorysTheDev
BorysTheDev previously approved these changes Oct 16, 2025

size_t SerializedMap::SerializeSize(Input input) {
size_t out = 4; // 4 byte number of entries
size_t out = kLenBytes; // number of entries
Copy link
Contributor

@kostasrim kostasrim Oct 16, 2025

Choose a reason for hiding this comment

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

four * two or even better four times two sounds like math poetry 🤣

@dranikpg dranikpg merged commit 5bbaa0d into dragonflydb:main Oct 16, 2025
10 checks passed
@dranikpg dranikpg deleted the tiering-serialized-map branch October 17, 2025 08:04
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.

3 participants