main · last commit
1 month ago ·
2npkec0r
tarantool-etcd-ipr LeaseKeepAlive on a dead lease tears down the whole bidi stream (should send TTL=0)
Lined Up
bd update tarantool-etcd-ipr --claim
bd close tarantool-etcd-ipr
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-07-17T13:19:06Z |
| Updated | 2026-07-17T13:19:06Z |
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.
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.
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.
No outgoing dependencies.
Nothing depends on this issue.
| 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 |
| issue_id | tarantool-etcd-ipr |
| label | etcd-changelog-sweep |
| 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 |
No comments.