Skip to content

Serialize shared Aerospike client calls - #24

Open
ZardLi1115 wants to merge 1 commit into
aerospike-community:mainfrom
ZardLi1115:fix/shared-client-call-gate
Open

Serialize shared Aerospike client calls#24
ZardLi1115 wants to merge 1 commit into
aerospike-community:mainfrom
ZardLi1115:fix/shared-client-call-gate

Conversation

@ZardLi1115

@ZardLi1115 ZardLi1115 commented May 16, 2026

Copy link
Copy Markdown

Summary

  • Add a per-process call gate keyed by Aerospike client identity so concurrent sessions sharing one synchronous client do not enter the C client concurrently.
  • Route AerospikeSession and ShardedAerospikeSession blocking client work through the shared gate.
  • Add a regression test with a blocking fake client to prove shared-client calls are serialized across sessions.

Tests

  • ruff format --check src/openai_agents_aerospike/session.py src/openai_agents_aerospike/sharded_session.py tests/test_session.py
  • ruff check .
  • mypy src/openai_agents_aerospike
  • pytest -q tests/test_session.py::test_shared_client_calls_are_serialized_across_sessions
  • pytest -q tests/test_import.py tests/test_session.py (Aerospike integration tests skipped because AEROSPIKE_HOST is unset)
  • pytest -q (Aerospike integration tests skipped because AEROSPIKE_HOST is unset)

Note: ruff format --check . still reports pre-existing formatting drift in benchmarks/infra/orchestrator/summarize_sweep.py, which this PR does not touch.

Fixes #13

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.

Sync aerospike-client-python SIGSEGV in as_partition_info_init under sustained high-concurrency load against a shared client

1 participant