Skip to content

keepalive(path, ttl) operation #60

@bigbes

Description

@bigbes

TbCS exposes keepalive both as a top-level API and as a transaction op. It extends the deadline of an existing expirable record:

  • Errors if path is a prefix.
  • Errors if ttl is +inf (cannot make a record permanent).
  • Errors if the schema lacks the deadline index.
  • Returns {ok = false, message = …} if the record does not exist or has no current deadline.
  • Only grows the deadline — if the new deadline is ≤ the existing one, it is a no-op.
  • Does not bump the global revision, by design — TTL-only updates must not fire watchers.

The wrapper has no operation type for it; the ops map is {get, put, delete} only.

etcd compatibility

LeaseKeepAlive(lease_id) — refreshes a lease, not a key. Mirroring etcd's lease API on top of TbCS would mean implementing the client-side lease emulation that the server-side etcd shim already does (in-memory {TTL, keys = {}} table; keepalive runs a txn that asserts every attached key still exists and refreshes each via keepalive). Recommend exposing native keepalive first; lease emulation can be a separate optional issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions