You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "importcpp (via GitHub)" <gi...@apache.org> on 2026/09/28 00:33:41 UTC

[PR] CASSANDRA-21496: Preserve RESTORE_REPLICA_COUNT in remotely initiated streams [cassandra]

importcpp opened a new pull request, #5218:
URL: https://github.com/apache/cassandra/pull/5218

   ## Problem and fix
   
   During node removal and remotely initiated CMS reconfiguration, `DataMovement` carries `RESTORE_REPLICA_COUNT.name()`. The receiver parses it with `StreamOperation.fromString()`, which matches descriptions, so the resulting stream is incorrectly classified as `OTHER`. For base tables with materialized views, that can unnecessarily route streamed data through view maintenance.
   
   Parse the operation with `valueOf()`, matching the existing senders and completion handler. Request and completion payloads, and the description-based `StreamInitMessage` format, remain unchanged.
   
   Jira: https://issues.apache.org/jira/browse/CASSANDRA-21496
   
   ## Regression coverage
   
   - Exercise `DataMovementVerbHandler` and verify the stream operation, acknowledgement, and completion payload.
   - Verify that replica restoration does not require the materialized-view write path.
   - Remove a node from a three-node, RF=2 cluster and verify restored data, topology completion, and stream classification.
   - Verify remote CMS streaming initiated by a node that is neither the source nor the target, including metadata-log contents and stream classification.
   
   The handler, node-removal, and CMS regression tests all failed before the fix with `expected:<RESTORE_REPLICA_COUNT> but was:<OTHER>`.
   
   ## Validation
   
   On macOS with OpenJDK 17.0.19 and Ant 1.10.13:
   
   - `.build/build-jars.sh -s` — passed.
   - `.build/check-code.sh -s` — passed, including RAT and production/test Checkstyle.
   - `.build/run-tests.sh -s -a test -t '/DataMovementVerbHandlerTest.java,/CassandraStreamReceiverTest.java,/StreamOperationTest.java'` — 9 tests passed.
   - `.build/run-tests.sh -s -a jvm-dtest -t '/RemoveNodeStreamingTest.java,/ReconfigureCMSStreamingTest.java'` — 2 tests passed.
   - `git diff --check` — passed.
   
   The two distributed tests use the existing `OneNetworkInterface` provisioning strategy to exercise real networking on separate ports without requiring additional loopback aliases.
   
   This PR targets `trunk`; the same parsing mismatch is also present on `cassandra-6.0` by source inspection. No backport or mixed-version test has been run.
   
   Full suites and community pre-commit CI have not been run. I do not currently have access to pre-commit CI; could a reviewer or committer run it for this patch?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org