cockroachdb / cockroachdb/cockroach
LogicTest needs real session managment
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
While investigating #150466, I discovered that there is no guarantee that statements will all be executed in deterministic sessions if an 'async' clause causes an additional connection to be spawned. Usually the async statement or query will be executed by the same session that runs the statement previous, with the next statement getting a new connection, but this is behavior is not guaranteed.
This nondeterminism is extremely limiting when writing tests to test concurrency controls within the database (e.g. locking). Logic test infrastructure should provide a mechanism to control what session/connection a given statement is issued on, ideally one that is backward compatible with existing tests.
Jira issue: CRDB-52772
Contributor guide
Research direction
Start by locating the LogicTest infrastructure and tracing how async statements select or spawn connections, using the behavior described in #150466 as context. The work is done when tests can explicitly control the session or connection for a statement, existing tests remain backward compatible, and concurrency controls such as locking can run deterministically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100