Skip to content

feat: add generation property to ReadFile for compare-and-swap write support - #481

Merged
trygve-lie merged 1 commit into
mainfrom
fix/write-options-and-generation
Aug 19, 2026
Merged

feat: add generation property to ReadFile for compare-and-swap write support#481
trygve-lie merged 1 commit into
mainfrom
fix/write-options-and-generation

Conversation

@trygve-lie

Copy link
Copy Markdown
Contributor

Adds an opaque generation property to ReadFile. Sinks populate it when reading a file (e.g. from the x-goog-generation GCS response header or an internal counter). Callers can pass it back to sink.write() as options.ifGenerationMatch to perform a compare-and-swap write that fails if another writer has modified the file since it was read.

Adds an opaque generation token to ReadFile that sinks can populate
when reading a file. Callers can pass this token back to sink.write()
via options.ifGenerationMatch to perform a compare-and-swap write that
fails if another writer has modified the file since it was read.
@trygve-lie
trygve-lie merged commit 416744d into main Aug 19, 2026
9 checks passed
@trygve-lie
trygve-lie deleted the fix/write-options-and-generation branch August 19, 2026 08:44
github-actions Bot pushed a commit that referenced this pull request Aug 19, 2026
# [5.2.0](v5.1.34...v5.2.0) (2026-08-19)

### Features

* add generation property to ReadFile for CAS write support ([#481](#481)) ([416744d](416744d))
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