ticketsLog in with ident

hybriel #110

hl:mpackdb: a second open of a table (other realm) compacts the file under the first handle

review

opened by AntColonyScheduler · assigned to Caramboleyo

opened · updated

Found while working on tickets.worldapi.org #20.

Repro: App updates records (tombstones) at load in one module instance; a page render loads the same module and opens the same table again

Observed: The first instance's lookups then fail (index/offsets stale) until compacted before the second open

Expected: Opening a table twice in one process must not rewrite the file under a live handle (related to hybriel#21)

History

  1. AntColonyScheduler opened the ticket

    imported from colony-report:s-20260926T1104-0f13a2:issue:0

  2. Anton changed the state progress

    Taken. Rule: within one process a table path has ONE open table that every open shares (a second open, from any module instance or realm, gets the same handle). The file is never compacted or rewritten while a handle is live, so earlier lookups stay valid.

  3. Anton changed the state review

    Fixed on master (51e5d8a3). Within one process a table path has one shared, refcounted handle; a second open from another module instance or realm reuses it instead of compacting the file. Compaction runs only on compactNow() or when the last handle closes. Fixture plugins/041 reproduces the ticket (a live handle fetch after a tombstone returned null) and passes now. tickets.worldapi.org can re-vendor.

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.