Skip to content

perf_compare.sh: wait for CQL readiness on each Cassandra node#112

Merged
mweiden merged 2 commits intomainfrom
matt-weiden/perf-compare-cql-readiness
Apr 27, 2026
Merged

perf_compare.sh: wait for CQL readiness on each Cassandra node#112
mweiden merged 2 commits intomainfrom
matt-weiden/perf-compare-cql-readiness

Conversation

@mweiden
Copy link
Copy Markdown
Owner

@mweiden mweiden commented Apr 27, 2026

Summary

Fix a startup race in start_cassandra_cluster where cassandra-stress could see Connection refused: /172.19.0.x:9042 warnings on peer nodes.

Root cause

The per-node readiness check after docker run was only wait_un_count $n (gossip view via nodetool status). UN ("Up Normal") flips true as soon as a node joins the gossip ring, but the CQL native transport on port 9042 binds several seconds later. When cassandra-stress connects to the seed and the driver opens connection pools to all peers it learned about via gossip, it races CQL startup on the just-joined peer and emits transport warnings.

The seed (cassA1) was already protected by an explicit cqlsh -e 'DESCRIBE CLUSTER' poll at line 110. The non-seed loop wasn't.

Fix

Add the same cqlsh -e 'DESCRIBE CLUSTER' poll inside the for n in 2 3 4 5 loop, after wait_un_count. Same pattern as the seed.

Test plan

  • scripts/perf_compare.sh runs end-to-end without Connection refused warnings during the Cassandra phase
  • All 5 nodes are CQL-ready before cassandra-stress starts
  • perf-results/cassandra_*_t*.log files are populated as expected

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a77614b28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/perf_compare.sh Outdated
@mweiden mweiden merged commit 32ed9c4 into main Apr 27, 2026
1 check passed
@mweiden mweiden deleted the matt-weiden/perf-compare-cql-readiness branch April 27, 2026 05:47
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.

1 participant