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

Update versionstamp mutation types to make them consistent #148

Closed
alecgrieser opened this issue Apr 12, 2018 · 0 comments
Closed

Update versionstamp mutation types to make them consistent #148

alecgrieser opened this issue Apr 12, 2018 · 0 comments
Assignees
Milestone

Comments

@alecgrieser
Copy link
Contributor

As the API stands now, the SET_VERSIONSTAMP_KEY mutation type allows users to choose an arbitrary location for their versionstamp by appending an offset to the end of their key. In contrast, the SET_VERSIONSTAMP_VALUE mutation type forces users to place their version at the beginning. The proposal of this issue is thus the following two things:

  1. It should be possible to place a versionstamp at an arbitrary offset of a value.
  2. The API for the two of them should be the same (i.e., append an offset with a fixed number of bytes to the end).

Because values can be longer than 65 kB, the way to do this that keeps them consistent is to have both mutations use a 4 byte offset instead of a 2 byte one. (In theory, 3 bytes could be used, but probably inventing 24-bit integers for this use case is worse than just sending an extra byte over the wire.) We can API version guard this so that only users who have requested API version 520 or newer will get the change, so old code will continue to work as desired.

@alecgrieser alecgrieser self-assigned this Apr 12, 2018
alecgrieser added a commit to alecgrieser/foundationdb that referenced this issue Apr 24, 2018
alecgrieser added a commit to alecgrieser/foundationdb that referenced this issue May 9, 2018
@etschannen etschannen added this to the 5.2 milestone May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants