Skip to content

feat(natsstore): journal refresh grants in a bucket without expiry - #20

Open
yordis wants to merge 1 commit into
yordis/feat-natsstore-e2efrom
yordis/feat-natsstore-journal
Open

yordis wants to merge 1 commit into
yordis/feat-natsstore-e2efrom
yordis/feat-natsstore-journal

Conversation

@yordis

@yordis yordis commented Nov 8, 2026 •

Copy link
Copy Markdown
Member
  • Replicas sharing credentials must not send the same single-use refresh grant twice. A claim is an atomic create on the grant digest and the receipt a revision CAS over it, so exactly one replica wins and an unfinished claim stays pending forever instead of being reclaimed, which keeps refresh_outcome_unknown meaning what it means for the file journal. The claim treats a delete marker as an existing write, because a plain KV create retries over a marker and would let a deleted claim be taken again.

Replicas sharing credentials must not send the same single-use refresh
grant twice. A claim is an atomic create on the grant digest and the
receipt a revision CAS over it, so exactly one replica wins and an
unfinished claim stays pending forever instead of being reclaimed, which
keeps refresh_outcome_unknown meaning what it means for the file journal.

The claim treats a delete marker as an existing write, because a plain
KV create retries over a marker and would let a deleted claim be taken
again.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6330ddd2-2856-4eac-a1c1-f942e3efa073
Commits

Reviewing files that changed from the base of the PR and between 3075fa7 and 53fc419.

Files selected for processing: 3

  • internal/store/natsstore/kv.go
  • internal/store/natsstore/refresh_journal.go
  • internal/store/natsstore/refresh_journal_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@yordis
yordis added this pull request to stack #9 November 8, 2026 02:37

This branch has not been deployed

No deployments
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