cockroachdb / cockroachdb/cockroach
Issue in nodedialer.ConnHealthTryDial causes distsql to attempt using unreachable nodes
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
`GetAllInstancesByLocality` returns a list of healthy instances that distsql can use. It is expected to filters unhealthy nodes using the most recent heartbeats.
https://github.com/cockroachdb/cockroach/blob/c6ba5e4a2444e4629742229a62bc67877e8a47da/pkg/sql/distsql_physical_planner.go#L227-L250
`ConnHealthTryDial` is used by distsql to check if a node is healthy or not based on the most recent heartbeat. `ConnHealthTryDial` doesn't appear to identify the dead nodes as expected. This can result in distsql using unreachable nodes.
https://github.com/cockroachdb/cockroach/blob/b588b5941abd0fc778e785741493beebdd4b46b9/pkg/rpc/nodedialer/nodedialer.go#L247-L259
Jira issue: CRDB-49903
Contributor guide
Research direction
Start by reading GetAllInstancesByLocality in pkg/sql/distsql_physical_planner.go and ConnHealthTryDial in pkg/rpc/nodedialer/nodedialer.go, focusing on how recent heartbeats identify unreachable nodes. Trace the distsql health check and run the relevant existing tests or reproduction if available. Done means distsql no longer selects nodes that the health check has identified as unreachable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100