Skip to content

scylla/3.11.x: fix ShardAwarenessTest patches for Scylla 2025.1#155

Merged
dkropachev merged 3 commits into
masterfrom
fix/shard-awareness-test-2025.1
Jun 28, 2026
Merged

scylla/3.11.x: fix ShardAwarenessTest patches for Scylla 2025.1#155
dkropachev merged 3 commits into
masterfrom
fix/shard-awareness-test-2025.1

Conversation

@nikagra

@nikagra nikagra commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

ShardAwarenessTest.correctShardInTracingTest fails on Scylla 2025.1 in the scylla/3.11.4.0 and scylla/3.11.5.15 matrix jobs with:

Expecting: <"shard 0/sl:default"> to start with: <"shard 1">

See companion driver PR for full root-cause analysis: scylladb/java-driver#931

Scope

This PR covers 3.x driver versions only (3.11.4.0, 3.11.5.15). The 4.x scylla driver versions are not changed4.19.2.0 requires Java 11+ and cannot run in the current matrix infrastructure (which hardcodes Java 8 in scripts/run_test.sh). That is tracked separately in issue #170 / draft PR #171.

Changes

versions/scylla/3.11.4.0/patch

Replaces the existing 1-hunk ShardAwarenessTest diff with a 2-hunk diff (b1867a0562→0d466c6b2a) that:

  1. Hunk 1 (@@ -82,12 +82,17 @@): narrows assertion to "querying locally" events only, strips /sl:... suffix, and fixes the assertThat(anyLocal) no-op → assertTrue(anyLocal).
  2. Hunk 2 (@@ -95,7 +100,7 @@): upgrades SimpleStrategy to NetworkTopologyStrategy and adds AND TABLETS = {'enabled': false} to disable tablets (line numbers shifted by +5 after hunk 1).

Also updates the CCMBridge getScyllaVersion() hunk to conditionally apply the release: prefix only when SCYLLA_UNIFIED_PACKAGE is not set (matching the pattern from PR #150).

versions/scylla/3.11.5.15/patch

Adds a 2-hunk ShardAwarenessTest diff (ac36feb518→0d466c6b2a):

  1. Hunk 1 (@@ -82,12 +82,17 @@): same assertion fix as above.
  2. Hunk 2 (@@ -95,7 +100,7 @@): adds AND TABLETS = {'enabled': false} to the existing NetworkTopologyStrategy keyspace (NTS is already in the 3.11.5.15 tag).

Also includes the same conditional release: prefix fix for CCMBridge.

versions/scylla/3.11.4.0/ignore.yaml and versions/scylla/3.11.5.15/ignore.yaml

Fix class-level ignore entries to use bare - ClassName format (without inline #method comments) to satisfy the PR #163 validator.

Testing

Primary goal — scylla-2025.1

java-driver-matrix-2025.1 build #2GREEN on Scylla 2025.1.15, all tested driver versions. correctShardInTracingTest passes explicitly for both 3.11.4.0 and 3.11.5.15.

No regressions — master

java-driver-matrix-master build #51 confirms:

Driver version Failures
scylla/3.11.5.15 0
scylla/3.11.4.0 0
scylla/4.19.0.9 0
datastax/4.19.3 0
datastax/4.19.2 0

correctShardInTracingTest shows SUCCESS explicitly in the log for both 3.11.5.15 and 3.11.4.0.

Note: both staging builds show overall FAILURE in Jenkins due to the email-sender Docker container (Docker exitcode: 1) failing to deliver the result email — a known staging infrastructure issue unrelated to test results. All test summaries confirm failures: 0.

@nikagra nikagra force-pushed the fix/shard-awareness-test-2025.1 branch from 1d96f3d to 7ddaa9e Compare June 25, 2026 21:09
@nikagra nikagra marked this pull request as ready for review June 25, 2026 21:18
@nikagra nikagra requested a review from dkropachev June 25, 2026 21:27
@dkropachev

Copy link
Copy Markdown
Collaborator

@nikagra , cicd is red

@nikagra

nikagra commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@dkropachev I know. It is caused by the yesterday's 4.19.2.0. I'm preparing patches for this version. Never ending story

@nikagra nikagra force-pushed the fix/shard-awareness-test-2025.1 branch from 6965248 to 7ddaa9e Compare June 26, 2026 11:37
@nikagra nikagra marked this pull request as draft June 26, 2026 11:38
@nikagra nikagra force-pushed the fix/shard-awareness-test-2025.1 branch from 7ddaa9e to 91fb779 Compare June 26, 2026 12:01
nikagra added 3 commits June 26, 2026 14:37
Scylla 2025.1 introduced two changes that broke correctShardInTracingTest:

1. Coordinator-side trace events now run on shard 0 regardless of the
   data shard (introduced with the new scheduling-group tracing).
   The old code asserted that *every* trace event's thread ran on the
   expected shard, which fails for these coordinator events.

2. Thread names now carry a service-level suffix in the form
   'shard N/sl:<level>' (e.g. 'shard 0/sl:default').
   The old startsWith(shard) assertion fails on this suffix.

Fix: narrow the thread-shard assertion to only the 'querying locally'
event (the one that actually runs on the data shard), strip any
'/sl:...' suffix before comparing, and promote the liveness guard from
the no-op assertThat(anyLocal) to assertTrue(anyLocal).

For 3.11.4.0 the existing NTS patch hunk is preserved; the new
thread-name-fix hunk is prepended.
Both 3.11.4.0 and 3.11.5.15 patches had unconditionally dropped the
'release:' prefix from the CCM version argument. Without this prefix,
CCM cannot download Scylla packages from S3 in GitHub Actions (where
SCYLLA_UNIFIED_PACKAGE is not set), causing every test to fail with:

  ccm create ... -v 2026.1.6 --config-dir=... failed to execute

Apply the same conditional logic introduced for 4.x patches in PR #150:
use 'release:' prefix when SCYLLA_UNIFIED_PACKAGE is absent (GitHub
Actions), bare version when it is present (Jenkins with local tarball).
Entries of the form '- ClassName #method' were misleading: YAML treats
the '#method' part as an inline comment, so only 'ClassName' is parsed —
the method hint was never machine-readable.  PR #163 added a validator
that raises ValueError on this format (aborts the entire test run).

Fix: move the method hint to a separate '# (methodName)' comment line
above each entry.  The YAML value stays as a bare 'ClassName', the
validator is satisfied, and the original class-level exclusion semantics
are preserved.
@nikagra nikagra force-pushed the fix/shard-awareness-test-2025.1 branch from 91fb779 to 570ba08 Compare June 26, 2026 12:37
@nikagra nikagra marked this pull request as ready for review June 26, 2026 17:40
@dkropachev dkropachev merged commit 5fb2b4d into master Jun 28, 2026
19 of 20 checks passed
@nikagra nikagra deleted the fix/shard-awareness-test-2025.1 branch June 29, 2026 13:08
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.

2 participants