Skip to content

Fixing some compile issues for alpine and centos, also fix endian issue for FLASH hashslot prefix#722

Merged
msotheeswaran-sc merged 16 commits intomainfrom
compile_fixes
Oct 13, 2023
Merged

Fixing some compile issues for alpine and centos, also fix endian issue for FLASH hashslot prefix#722
msotheeswaran-sc merged 16 commits intomainfrom
compile_fixes

Conversation

@msotheeswaran-sc
Copy link
Copy Markdown
Collaborator

@msotheeswaran-sc msotheeswaran-sc commented Oct 5, 2023

Current implementation of hash slot prefix resulted in incorrect enumeration due to using the wrong 2 bytes, so just use the whole value.
Fixes issue #677.
also update alpine version in Dockerfile Fixes issue #721.

Comment thread src/storage/rocksdb.cpp Outdated
{
char *hash_char = (char *)&hashslot;
return std::string(hash_char + (sizeof(unsigned int) - 2), 2);
return std::string(hash_char, sizeof(unsigned int));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You want uint16_t not unsigned, otherwise your wasting 2 bytes for every key

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

updated

Comment thread src/server.h
@msotheeswaran-sc msotheeswaran-sc merged commit 79b0c84 into main Oct 13, 2023
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