Skip to content

fs/kvdb:extend val_len to 2 bytes to support property value up to 1024 - #5

Open
wjh199742 wants to merge 1 commit into
open-vela:devfrom
wjh199742:wjh-fix-branch
Open

fs/kvdb:extend val_len to 2 bytes to support property value up to 1024#5
wjh199742 wants to merge 1 commit into
open-vela:devfrom
wjh199742:wjh-fix-branch

Conversation

@wjh199742

Copy link
Copy Markdown

Encode val_len as 2 little-endian bytes in the client/server wire protocol and raise PROP_VALUE_MAX from 255 to 1024, so larger property values can be transferred.

Note: Please adhere to Contributing Guidelines.

Summary

Update KVDB client/server protocol to support larger property values.

The original protocol uses 1-byte val_len, which limits property values
to 255 bytes. This patch changes val_len to 2-byte little-endian format
and increases PROP_VALUE_MAX from 255 to 1024.

This allows KVDB to transfer larger property values through the
client/server interface.

Impact

  • Increase maximum property value size from 255 to 1024 bytes.
  • Client and server protocol format are changed, so both sides need to
    be updated together.
  • No impact for existing property values smaller than 255 bytes.

Testing

Tested KVDB client/server communication with:

  • Property value size < 255 bytes
  • Property value size > 255 bytes
  • Property value size close to 1024 bytes

Verified that property set/get operations work correctly.

Encode val_len as 2 little-endian bytes in the client/server wire protocol
and raise PROP_VALUE_MAX from 255 to 1024, so larger property values can be
transferred.

Signed-off-by: jinghengwan <jinghengwan@bestechnic.com>
@github-actions

Copy link
Copy Markdown

❌ CLA Signature Required

@wjh199742 Some contributors need to sign the CLA:

  • jinghengwan@bestechnic.comNeeds to sign CLA

Please:

  1. Sign the CLA at: https://www.openvela.com/#/community/cla
  2. After signing, comment /check-cla to recheck

📋 View detailed check results: Action Run #29067966506


💡 Tip: All contributors must sign the CLA before the PR can be merged.

@wjh199742 wjh199742 closed this Jul 10, 2026
@wjh199742 wjh199742 reopened this Jul 10, 2026
@wjh199742

Copy link
Copy Markdown
Author

Hi @xiaoxiang781216 ,

Could you please help review this PR?

Thanks.

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.

1 participant