Skip to content

feat(rollout): expose a synchronous-visibility write option on the HTTP API #186

Description

@beinan

Summary

Since #181, a rollout append is durable on return but not visible until the next flush tick (default 30s). RolloutStore::flush() exists (crates/lance-context-core/src/rollout_store.rs:621-640) but is not reachable from the HTTP API, so callers that need read-your-write have no way to get it short of setting the global flush interval very low.

Motivating cases

  • an RL training loop that appends a trajectory and immediately reads it back to verify
  • write-then-assert in integration tests
  • any client doing POST /rollouts/{name}/records followed by GET

All of these silently observe a missing row for up to rollout_flush_interval_secs.

Proposal

Add an opt-in per-request flag on the rollout append route (crates/lance-context-server/src/routes/rollouts.rs), e.g. ?visible=true or an X-Rollout-Visible header, that performs add() followed by flush() before responding.

Alternative considered

Lowering the global flush interval affects every store in the process and re-serializes writes that do not need the guarantee. A per-request opt-in keeps the choice with the caller.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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