apache / apache/cassandra-gocql-driver

awaitSchemaAgreement not ignoring DOWN node

Open
#1,736 17 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.7k
Forks
658
PR merge metrics
No merged PRs in 30d

Description

Please answer these questions before submitting your issue. Thanks!

### What version of Cassandra are you using?
3.11.11

### What version of Gocql are you using?
v1.6.0

### What version of Go are you using?
1.21.6

### What did you do?
Running migrations that use `WaitForSchemaAgreement`

### What did you expect to see?
The migrations to finish successfully

### What did you see instead?
```
gocql: cluster schema versions not consistent: [ ]
```

---
### Describe your Cassandra cluster
I have a cluster of 50+ nodes. One of them was replaced a few days ago but the `system.peers` was left in an inconsistent state, where the replaced node is still showing in there with a different `schema_version`.

The `nodetool status` command prints out the "correct" output, where the old node is NOT shown.

The `system.peers` table shows the old node and all columns are filled with some value, like:
```
peer | rpc_address | schema_version
10.100.XX.XX | 10.100.XX.XX |
```

The old node is unreachable.

Contributor guide

Open the contributing guide

Research direction

Start from WaitForSchemaAgreement and inspect how schema versions are collected from system.peers, comparing that behavior with the nodes shown by nodetool status. Reproduce the case with an unreachable replaced node whose peer row has a different schema_version, then verify that migrations finish successfully while the DOWN node is ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.