Skip to content

test(bigtable): add accelerator concurrency and thread-safety tests - #12

Open
mutianf wants to merge 2 commits into
accel-11-lifecycle-leak-testsfrom
accel-12-concurrency-thread-safety
Open

test(bigtable): add accelerator concurrency and thread-safety tests#12
mutianf wants to merge 2 commits into
accel-11-lifecycle-leak-testsfrom
accel-12-concurrency-thread-safety

Conversation

@mutianf

@mutianf mutianf commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Adds accelerator concurrency and thread-safety tests (async + autogen).

Part of the accelerator test stack. Stacked on top of #11.

@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from aa06892 to c9e1985 Compare August 11, 2026 14:07
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from 39c49f8 to 7e5a0db Compare August 11, 2026 14:07
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from c9e1985 to c26b6d4 Compare August 12, 2026 03:04
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from 7e5a0db to 7e4e81a Compare August 12, 2026 03:04
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from c26b6d4 to 992099b Compare August 12, 2026 14:07
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from 7e4e81a to 250c051 Compare August 12, 2026 14:07
"""Many concurrent callers sharing one accelerated table."""

NUM_WORKERS = 6
OPS_PER_WORKER = 12

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems low? Also I think we want mutliple processes, instead of just multiple workers.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in commit ea61173:

  • Raised the load: NUM_WORKERS 6 -> 16, OPS_PER_WORKER 12 -> 50.
  • Added test_multiprocess_concurrent_clients_stay_consistent, which spawns NUM_PROCESSES=4 separate processes (via multiprocessing.get_context("fork")), each building its OWN accelerated client + Table and driving it from WORKERS_PER_PROCESS=8 concurrent threads. Since the daemon is spawned per-Table (verified in client.py/_daemon.py), each process gets its own daemon + UDS, so this genuinely exercises inter-process concurrency (multiple independent daemons) on top of the existing intra-process thread-safety test. Every worker owns a disjoint worker-id block / key prefix, and each child reports (ok, touched_keys, error) back over a queue so any cross-process interference or exception fails the test; the parent tracks touched keys with the janitor for cleanup. Regenerated the CrossSync sync twin.

@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from e024e78 to d89f2dc Compare August 12, 2026 16:32
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from ea61173 to e76f029 Compare August 12, 2026 16:32
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from d89f2dc to 17c8bf9 Compare August 12, 2026 18:56
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from e76f029 to 6dbdb95 Compare August 12, 2026 18:56
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from 17c8bf9 to 840229f Compare August 12, 2026 19:04
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from 6dbdb95 to c37d4ac Compare August 12, 2026 19:04
Change-Id: Ic208e22d6499d1525596d15f29bd3ee7d5946c55
…ess test

Change-Id: Ie63ca0e0354f218a2aec09e4c60cb4ce27afa5e8
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from 840229f to 0f82a63 Compare August 14, 2026 21:02
@mutianf
mutianf force-pushed the accel-12-concurrency-thread-safety branch from c37d4ac to e017fa9 Compare August 14, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant