You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ODBC: make handles thread-safe and support concurrent statements #656
Tracked by #587 and required by the target design in #644.
Scope
Make the driver thread-safe and remove thread affinity from environment,
connection, statement, and descriptor handles.
Serialize conflicting operations on the same handle internally instead of
requiring application-side locking.
Synchronize diagnostics, child-handle registration, descriptors, parameters,
cursor state, connection attributes, transaction state, disconnect, and
handle destruction without introducing use-after-free races.
Allow distinct statement handles on one autocommit connection to execute
concurrently through separate sessions from the SDK client pool.
Serialize query execution for statements sharing one explicit transaction,
because a YDB transaction uses one single-threaded session. This is internal
serialization; applications do not need an external connection mutex.
Keep cross-thread SQLCancel race-free without blocking it behind an
in-flight statement call. Backend interruption remains outside this ticket
unless the cancellation design is expanded separately.
Verify driver-manager pooling and connection reuse across threads, and report SQL_MAX_CONCURRENT_ACTIVITIES consistently with the implemented behavior.
Tests
Concurrent calls on different connections and different statements on one
connection.
Concurrent autocommit execution and serialized explicit-transaction
execution.
Calls from different threads on the same handle.
Cross-thread cancellation, diagnostics, disconnect, and handle-free races.
Connection-pool reuse on a thread different from the thread that connected.
ThreadSanitizer coverage for the driver concurrency tests where supported.
Acceptance
The driver requires no application-side locking for thread safety, unrelated
handles and autocommit statements can make progress concurrently, and explicit
transaction execution is serialized internally without races or state loss.
Activity