You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under sustained load the per-shard lease is kept warm by:
Coordinate.Dispatch / leaseRefreshingTxn (writes refresh on commit).
Lua scripts that call LeaseRead at script entry.
Not wrapping these handlers means: they read local LastCommitTS with no quorum check, the same trade-off they had before PR #549. The PR has not regressed safety; it has just not finished tightening it.
Acceptance
Each handler entry calls r.coordinator.LeaseReadForKey(ctx, key) (or LeaseRead(ctx) for keyless ops) once before resolving readTS.
Background
PR #549 wraps three high-traffic read paths in
LeaseRead:adapter/redis_lua_context.gonewLuaScriptContextadapter/redis.gogetadapter/dynamodb.gogetItemThe remaining read handlers were left to a follow-up to keep PR #549 reviewable.
Scope
adapter/redis.go:keys,exists-family, ZSet readers (zrange,zcard,zscore,zrangebyscore, ...), Hash readers (hget,hgetall,hmget,hexists,hlen, ...), List readers (lindex,llen,lrange, ...), Set readers (smembers,sismember,scard, ...), Stream readers (xread,xrange,xlen, ...).adapter/dynamodb.go:query,scan,transactGetItems,batchGetItem.Why low priority
Under sustained load the per-shard lease is kept warm by:
Coordinate.Dispatch/leaseRefreshingTxn(writes refresh on commit).LeaseReadat script entry.Not wrapping these handlers means: they read local
LastCommitTSwith no quorum check, the same trade-off they had before PR #549. The PR has not regressed safety; it has just not finished tightening it.Acceptance
r.coordinator.LeaseReadForKey(ctx, key)(orLeaseRead(ctx)for keyless ops) once before resolvingreadTS.context.WithTimeoutfor handlers that don't have a request-scoped deadline (mirrors the pattern inredis.gogetafter PR feat(lease-read): leader-local lease read for coordinator and engine #549).References: PR #549, follow-up.