~bigbes/tarantool-etcd · events

ecp6g5uda70hf8rc940bd3d8s6rrc4g9 · 269 rows

idissue_idevent_typeactorold_valuenew_valuecommentcreated_at
0dde83d7-e674-5d3f-8fc0-a45e38f1d0d7tarantool-etcd-hcocreatedEugene BlikhNULL2026-05-19T17:54:50Z
0e083d9b-8353-5968-9978-020844f4464ftarantool-etcd-lkolabel_addedEugene BlikhNULLNULLAdded label: milestone:m5-clustering2026-05-21T14:37:44Z
0e989489-82a6-50bd-9ccd-754247f39deatarantool-etcd-wqncreatedEugene BlikhNULL2026-05-19T17:54:30Z
0fa26399-9ced-5971-80c7-063b3bfaca35tarantool-etcd-216createdEugene BlikhNULL2026-05-19T17:54:37Z
1259ab19-ae1d-5698-a632-403e4af4ec52tarantool-etcd-3c2label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:20Z
125dcdc9-2e09-5191-a91c-5ab755404b04tarantool-etcd-0uwcreatedEugene BlikhNULL2026-05-19T17:53:54Z
13056279-313a-53bb-bcfc-bd5bba87b080tarantool-etcd-3cocreatedEugene BlikhNULL2026-05-19T17:54:16Z
1979417f-6315-5926-9696-1be328f9220ftarantool-etcd-umclabel_addedEugene BlikhNULLNULLAdded label: milestone:m5-clustering2026-05-21T14:37:40Z
1ae6dd7e-246a-5125-8b89-8bbfc924f6f2tarantool-etcd-g1acreatedEugene BlikhNULL2026-05-19T17:54:25Z
1bd893f0-4205-55f7-8f79-5f804792e5f7tarantool-etcd-kbccreatedEugene BlikhNULL2026-05-19T17:11:01Z
1bf3c080-1657-5e4f-80fe-30e659a6777etarantool-etcd-rzhlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:17Z
1c1daa99-199c-57eb-ab9d-866588741256tarantool-etcd-bolcreatedEugene BlikhNULL2026-05-19T17:54:11Z
1d5e8f05-4a3f-5423-b217-cf35d66e69e8tarantool-etcd-50glabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:21Z
1dccbd6d-7e3a-5c39-af94-719655634010tarantool-etcd-0uwlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:34Z
1efb78c9-f246-53ef-b807-43cdc05c2factarantool-etcd-huolabel_addedEugene BlikhNULLNULLAdded label: milestone:m2-production2026-05-21T14:37:05Z
1f8546b1-c586-522e-936d-7cb640ca04e8tarantool-etcd-zwgcreatedEugene BlikhNULL2026-05-19T17:54:07Z
1fe83348-505a-54a0-9cc5-fcd1661a2c16tarantool-etcd-axscreatedEugene BlikhNULL2026-05-20T09:45:14Z
206783c1-a17a-5aed-b653-0b5827b407d0tarantool-etcd-9ljcreatedEugene BlikhNULL2026-05-19T17:54:07Z
211f17a2-763e-5f08-aead-3a2196ee8788tarantool-etcd-4y9createdEugene BlikhNULL2026-05-19T17:54:52Z
21fc93e6-3bcd-5f7b-acec-745bcb0f2d5btarantool-etcd-60xlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:31Z
224c2a43-8db1-5966-b1e2-17e6c11f33f9tarantool-etcd-9z2createdEugene BlikhNULL2026-05-19T16:34:06Z
24d3ebd3-a7ca-50b2-ae1f-34e8da8c0a5ctarantool-etcd-584label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:34Z
273bc102-02cd-51b4-bc8b-ba8ef983a914tarantool-etcd-gz4label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:35Z
27b58acb-29e5-5525-9be1-9c1c3f97a393tarantool-etcd-unwcreatedEugene BlikhNULL2026-05-20T09:55:22Z
2a557ed5-9b04-528e-b7c0-c84d21b905cbtarantool-etcd-4y9label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:09Z
2a560375-ce81-57d9-a89d-55f8c0ad3deftarantool-etcd-3dkcreatedEugene BlikhNULL2026-05-19T17:53:55Z
2ab8ffc9-93c7-596a-8b09-0fa771897bd0tarantool-etcd-a4vlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:30Z
2af6d317-371a-57d1-a6eb-738530e6ba88tarantool-etcd-00hcreatedEugene BlikhNULL2026-05-20T09:55:25Z
2d2921da-ee80-5cc0-a09c-d4f77d9f9c99tarantool-etcd-bq8createdEugene BlikhNULL2026-05-19T17:53:59Z
2e423a8e-65ef-54e2-bd3c-328e5aa11ea5tarantool-etcd-zc7createdEugene BlikhNULL2026-05-20T17:33:30Z
2e4bb86d-cb02-5103-b235-512b574a636ctarantool-etcd-3spupdatedEugene Blikh{"id":"tarantool-etcd-3sp","title":"LeaseKeepAlive fsyncs WAL on every renew","description":"On btrfs SSD bench (2026-05-19 disk run), LeaseKeepAlive/n_X drops from 4 234 ops/s (tmpfs) to 207 ops/s on tarantool while etcd holds at ~7 400 ops/s in both configs.\n\np50 goes from 224 µs (tmpfs) to 4 548 µs (disk) — exactly one btrfs fsync. Root cause at app/etcd/lease.lua:191:\n\n box.space.leases:update(id, {{'=', 'expiry_time', now + lease.ttl}})\n\nThe leases space is is_sync=true so every keep-alive does a full WAL append + fsync. Etcd's KeepAlive is an in-memory TTL bump with no disk write.\n\nFix sketch: split expiry into an in-memory map (refreshed on every KeepAlive) and persist only on grant/revoke. The expiry fiber should read from the in-memory map. Trade-off: leases may extend further into the future than the on-disk record after a crash, which is fine — clients have to re-keep-alive after reconnect anyway.\n\nSee docs/BENCH.md Linux x86_64 disk section (Open follow-ups).","design":"GOAL: lease keep-alive must not touch the WAL. Mirror etcd's split — durable\nstate = {lease record, granted TTL, attached keys}; ephemeral leader-local\nstate = the expiry deadline (refreshed on every keep-alive, never persisted).\n\n=== STATE MODEL ===\nAdd a module-level in-memory map in app/etcd/lease.lua:\n local deadlines = {} -- [lease_id] = monotonic deadline (clock.monotonic()+ttl)\nThis is leader-local. Followers never keep-alive (the gRPC write gate routes\nLeaseKeepAlive to the leader), and only the leader runs the expiry fiber and\ncan revoke. So the countdown is structurally a leader concern.\n\nThe `leases` space (schema.lua:97-118) stays is_sync=true and keeps its\n{id, ttl, expiry_time, granted_ttl} format. The `expiry_time` FIELD and its\nTREE index (schema.lua:113) become vestigial — written once at grant, never\nthe source of liveness again. Leave them to avoid a space migration; an\noptional follow-up can drop the field+index. Nothing reads expiry_time after\nthis change.\n\n=== HANDLER CHANGES (app/etcd/lease.lua) ===\n1. grant() ~L70: after `box.space.leases:insert(...)`, seed\n `deadlines[id] = now + ttl`. Insert still persists (durable, required).\n2. keepalive() ~L191: REPLACE\n box.space.leases:update(id, {{'=', 'expiry_time', now + lease.ttl}})\n with\n deadlines[id] = clock.monotonic() + lease.ttl\n Keep the `box.space.leases:get(id)` existence check above it (cheap read,\n no fsync) — it supplies lease.ttl and preserves the NOT_FOUND-raises\n contract the gRPC stream handler depends on (see L169-171).\n3. revoke() ~L150: after `box.space.leases:delete(id)`, clear\n `deadlines[id] = nil`.\n4. time_to_live() ~L236: REPLACE `lease.expiry_time` read with `deadlines[id]`.\n If deadlines[id] is nil (lease loaded but not yet rebuilt), fall back to\n `clock.monotonic() + lease.granted_ttl`. remaining = max(0, floor(dl - now)).\n5. expiry_loop() L287-338: REPLACE the `box.space.leases.index.expiry_time`\n scan (L302-309) with a scan of `deadlines`: collect ids where\n `deadline \u003c= now`. Plain full-table scan is fine (numeric compares in Lua,\n runs every 500ms); a min-heap (etcd's leaseExpiredNotifier shape) is the\n optional optimization if lease counts get large. revoke() already nils the\n map entry on success.\n\n=== REBUILD ON PROMOTE ===\nAdd lease.M.rebuild_deadlines():\n clears `deadlines`, then for each tuple in box.space.leases:pairs() sets\n deadlines[tuple.id] = clock.monotonic() + tuple.ttl\nCall it in the RW branch of the box.watch('box.status', ...) callback in\napp/roles/etcd.lua (L341-353), immediately before lease.start_expiry().\nThis resets every inherited lease's deadline to a full-TTL grace period on the\nnew leader — exactly etcd's failover behavior.\n\n=== LATENT BUG THIS ALSO FIXES ===\nexpiry_time is currently computed as clock.monotonic()+ttl and REPLICATED.\nclock.monotonic() is process-local (relative to boot), so the persisted value\nis meaningless on any other node. Today a promoted replica's fiber scans\ninherited expiry_time values from a different monotonic timeline — could\nexpire leases instantly or never. Rebuild-on-promote with the new leader's own\nclock removes this entirely.","status":"open","priority":2,"issue_type":"bug","owner":"bigbes@gmail.com","created_at":"2026-05-19T17:33:47Z","created_by":"Eugene Blikh","updated_at":"2026-05-20T04:39:03Z"}{"acceptance_criteria":"- keepalive issues ZERO WAL writes: box.info.lsn delta == 0 across N successive\n M.keepalive() calls on the same lease.\n- BenchmarkLeaseKeepAlive/n_* on btrfs SSD (work.lab.local, real-disk run)\n recovers from 207 ops/s to within ~2x of etcd (~4000+ ops/s, near the tmpfs\n baseline). Re-run: TMPDIR=$HOME/bench-data go test -run=^$ \\\n -bench=^BenchmarkLeaseKeepAlive$ -benchtime=5s ./bench/\n- Lease still expires correctly: grant short TTL, no keep-alive, attached keys\n are deleted by the fiber after TTL elapses; keep-alive before TTL prevents it.\n- TimeToLive reflects the latest keep-alive (remaining resets to ~ttl after a\n renew).\n- Promote rebuilds deadlines: a freshly-promoted leader expires inherited\n leases using its own monotonic clock (no instant-expiry, no never-expiry).\n- All existing lease conformance cells (tarantool, tarantool_json,\n tarantool_rs3) and Lua lease tests pass.","notes":"TESTS (add Lua-side tests pinning the fix per the project's regression rule):\n- no-WAL: assert box.info.lsn unchanged across keepalive calls.\n- liveness: keepalive refreshes deadline (TimeToLive resets, lease survives).\n- promote rebuild: use the box.cfg{read_only=true}...{read_only=false}+\n box.ctl.promote() in-process follower-simulation pattern (see role_test.lua\n group role/write_gates_in_process) to verify rebuild_deadlines repopulates.\n- cross-node: optionally exercise via the replicaset harness that a promoted\n replica expires an inherited lease.\nConformance already covers cross-wire correctness; this is about the Lua unit\npins + the bench recovery number.\n\nDOCS: update docs/BENCH.md Linux x86_64 disk section once re-benched; remove\nthe LeaseKeepAlive \"bug\" annotation from the headline table.\n\nSCOPE NOTE: leave the expiry_time field + index in place (no migration). Only\nthe keepalive write path and the fiber's liveness source change."}NULL2026-05-20T07:39:22Z
2f276f77-e202-54ef-b062-c93aca3cecadtarantool-etcd-1qacreatedEugene BlikhNULL2026-05-20T14:59:03Z
2fe0aa28-0e64-5022-9f40-fef3762e3705tarantool-etcd-cpplabel_addedEugene BlikhNULLNULLAdded label: milestone:m3-performance2026-05-21T14:37:07Z
304f1a99-c12b-53c8-803f-894d5ac24900tarantool-etcd-929createdEugene BlikhNULL2026-05-19T17:54:30Z
3114e9cd-ad31-5a26-95ec-70009b03eeb7tarantool-etcd-9z2label_addedEugene BlikhNULLNULLAdded label: milestone:m1-conformance2026-05-21T14:37:00Z
3150db32-8d23-59b8-a3a2-5a1acf8acc54tarantool-etcd-mo5label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:19Z
315e7be9-6d93-5ed9-bee8-f5ac6acb6334tarantool-etcd-ovolabel_addedEugene BlikhNULLNULLAdded label: milestone:m5-clustering2026-05-21T14:37:38Z
335be1e1-e2fa-55d9-a88e-79e9d69f207ctarantool-etcd-rzrlabel_addedEugene BlikhNULLNULLAdded label: milestone:m3-performance2026-05-21T14:37:07Z
33f49e68-307a-5917-a329-d9bb120ee9e2tarantool-etcd-234label_addedEugene BlikhNULLNULLAdded label: milestone:m3-performance2026-05-21T14:37:08Z
34cff267-d3fc-5b04-bf47-4e2a07d58c9ftarantool-etcd-2alcreatedEugene BlikhNULL2026-05-19T17:54:10Z
35aa9bee-3b46-59df-b047-ef80eef443b7tarantool-etcd-1twcreatedEugene BlikhNULL2026-05-20T09:55:24Z
36264f30-a142-5446-9a0a-fc667a3601fctarantool-etcd-wgxcreatedEugene BlikhNULL2026-05-19T17:54:05Z
37ceff1e-fe86-5447-aab6-15210d342963tarantool-etcd-p3screatedEugene BlikhNULL2026-05-19T17:54:48Z
3cc6dd53-fbe3-5180-a694-3fcbc8684f40tarantool-etcd-hx9createdEugene BlikhNULL2026-05-19T17:54:20Z
3cd7fec2-670c-53d6-b11f-c9dbeb2faa3atarantool-etcd-2allabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:26Z
3d79b61c-2c21-53f2-8af2-dcb7bb5b41bdtarantool-etcd-sdtlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:29Z
3f4aac09-c0ef-5377-aa03-5b782054e6fbtarantool-etcd-w8qcreatedEugene BlikhNULL2026-05-19T17:53:51Z
42330dca-3276-54ef-a503-e0aec9131e67tarantool-etcd-bdfcreatedEugene BlikhNULL2026-05-20T09:55:23Z
45d5d964-749f-56d7-8ba9-d88173c9a77dtarantool-etcd-ag2label_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:28Z
46b35be7-0e7f-5aca-8d20-68f0ff1f5443tarantool-etcd-ovtlabel_addedEugene BlikhNULLNULLAdded label: milestone:m4-iproto-parity2026-05-21T14:37:21Z