Skip to content

implement versionstamp bindings for tuple layer #128

Closed
@pH14

Description

@pH14

Versionstamps are a compelling feature that tie in closely with the tuple layer, and are the main thing currently missing from it right now.

They have a bit of a weird API, where you encode an incomplete versionstamp to a tuple, pack the tuple with a special offset (w/ different values depending on FDB client version), write the resulting bytes with the SET_VERSIONSTAMP_(KEY|VALUE) atomic operations, and then FDB magically replaces the incomplete-versionstamp portion of the tuple with the actual commit-time versionstamp when it writes to disk.

They were recently added to the golang bindings: https://github.com/apple/foundationdb/pull/1187/files which makes for a nice distillation of what they need to work.

That said: they do puncture a bit of the clean implementation of tuples we have now, since they add some new invariants:

  • vanilla packing of a tuple cannot contain an incomplete versionstamp, otherwise it fails
  • versionstamp-packing a tuple must contain exactly one incomplete versionstamp, otherwise it fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions