Skip to content

Unit test red on main: 'Audit log: can handle separate subscriptions on separate dbs' (2 == 1, duplicate/leaked subscription event) #1141

Description

@heskew

Bug Summary

The resources unit test Audit log › can handle separate subscriptions on separate dbs (unitTests/resources/auditLog.test.js:502) fails on main:

AssertionError [ERR_ASSERTION]: 2 == 1
  at Context.<anonymous> (unitTests/resources/auditLog.test.js:502:11)

The test creates DB_COUNT = 3 tables on separate databases (test-subscribe0/1/2), subscribes to each, puts a single record into each, waits for the first data event per table, then asserts each subscription received exactly one event. One subscription receives 2 events for its single put — so this is either a duplicate data delivery or cross-database subscription event leakage.

Reproduction

1. Check out main.
2. npm run build
3. npx mocha unitTests/resources/auditLog.test.js
4. Observe `can handle separate subscriptions on separate dbs` failing with `2 == 1`.

Notes / scope

First triage question

Is one subscription receiving a duplicate data event for its own single put, or an event leaked from another database's table/log? The audit/transaction-log subscription machinery (RocksTransactionLogStore per-log iterators, listenToCommits) is the place to look — a subscription keyed to one db's log picking up another db's commit, or re-emitting a single commit twice, would both produce 2 == 1 here.


🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Jun 4, 2026
  2. added
    bugSomething isn't working
    testsMostly focused on tests, testing infrastructure, etc.
    on Jun 4, 2026
  3. added this to the v5.3 milestone on Aug 7, 2026
  4. added theissue type on Aug 7, 2026
  5. modified the milestones: v5.3, v5.4 on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestsMostly focused on tests, testing infrastructure, etc.

Type

Fields

Priority

P2

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions