~bigbes/tarantool-etcd · parade

main · last commit 1 month ago · 2npkec0r

← Back to the parade

tarantool-etcd-ipr LeaseKeepAlive on a dead lease tears down the whole bidi stream (should send TTL=0) Lined Up

status: open P1 bug etcd-changelog-sweep
bd update tarantool-etcd-ipr --claim bd close tarantool-etcd-ipr
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-07-17T13:19:06Z
Updated2026-07-17T13:19:06Z
Description
etcd's v3rpc/lease.go sends LeaseKeepAliveResponse{TTL:0} for an unknown/expired lease and KEEPS THE STREAM OPEN. We close the stream with gRPC NOT_FOUND (app/etcd/grpc.lua:603-611); the JSON gateway emits an {"error":...} chunk instead of {"result":{"TTL":"0"}}.

Impact: clientv3 multiplexes every lease's keep-alive onto ONE stream. One dead lease therefore tears down the shared stream for all live leases and causes retry churn until it ages out.

This is deliberate (see the comment at app/etcd/lease.lua:203-210, a fiber-pinning concern) — but it is recorded ONLY in a code comment, which violates the project rule that a deliberate divergence goes in docs/TODO.md. That is also why the sweep initially read it as untracked. Either implement it or document it; the current state is the worst of both.
Design
The fiber concern looks solvable without closing: drop the dead lease from the stream's keep-alive set, send the TTL=0 frame, and continue the recv loop. If it is kept as-is instead, add it to docs/TODO.md 'Deliberately not done' with the fiber rationale.
Acceptance criteria
KeepAlive on an expired lease returns TTL=0 and the stream stays open on both wires; other leases on the same stream keep renewing; if closed as WONTFIX, docs/TODO.md carries the rationale.

Depends on

No outgoing dependencies.

Depended on by

Nothing depends on this issue.

No comments.

  • Eugene Blikh created the issue · 2026-07-17T16:19:06Z
  • Eugene Blikh added label etcd-changelog-sweep · 2026-07-17T16:19:06Z
Stored rows — what this pane was built from, as read
issues 1 row
id tarantool-etcd-ipr
content_hash 7f0f2f7a10fe1e8c085396a71c2280cf000627d894f31b2e7d6307c2a53bf5bc
title LeaseKeepAlive on a dead lease tears down the whole bidi stream (should send TTL=0)
description etcd's v3rpc/lease.go sends LeaseKeepAliveResponse{TTL:0} for an unknown/expired lease and KEEPS THE STREAM OPEN. We close the stream with gRPC NOT_FOUND (app/etcd/grpc.lua:603-611); the JSON gateway emits an {"error":...} chunk instead of {"result":{"TTL":"0"}}. Impact: clientv3 multiplexes every lease's keep-alive onto ONE stream. One dead lease therefore tears down the shared stream for all live leases and causes retry churn until it ages out. This is deliberate (see the comment at app/etcd/lease.lua:203-210, a fiber-pinning concern) — but it is recorded ONLY in a code comment, which violates the project rule that a deliberate divergence goes in docs/TODO.md. That is also why the sweep initially read it as untracked. Either implement it or document it; the current state is the worst of both.
design The fiber concern looks solvable without closing: drop the dead lease from the stream's keep-alive set, send the TTL=0 frame, and continue the recv loop. If it is kept as-is instead, add it to docs/TODO.md 'Deliberately not done' with the fiber rationale.
acceptance_criteria KeepAlive on an expired lease returns TTL=0 and the stream stays open on both wires; other leases on the same stream keep renewing; if closed as WONTFIX, docs/TODO.md carries the rationale.
notes
status open
priority 1
issue_type bug
assignee NULL
estimated_minutes NULL
created_at 2026-07-17T13:19:06Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-07-17T13:19:06Z
closed_at NULL
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata <binary>
source_repo
close_reason
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at NULL
is_blocked 0
labels 1 row
issue_id tarantool-etcd-ipr
label etcd-changelog-sweep
events 2 rows
id 019f703b-0f06-7a87-af74-8713cf08af31
issue_id tarantool-etcd-ipr
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-07-17T16:19:06Z
id 019f703b-0f07-7416-b9fb-1891eef8e910
issue_id tarantool-etcd-ipr
event_type label_added
actor Eugene Blikh
old_value NULL
new_value NULL
comment Added label: etcd-changelog-sweep
created_at 2026-07-17T16:19:06Z