[ 
https://issues.apache.org/jira/browse/CASSANDRA-21496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119924#comment-18119924
 ] 

George commented on CASSANDRA-21496:
------------------------------------

PR ready for review: https://github.com/apache/cassandra/pull/5218
Commit: 335aeb53411c7e5190d13079bd70cff5597b4b7f
Target branch: trunk

The receiver now parses DataMovement.streamOperation with 
StreamOperation.valueOf(), matching the enum names already sent by 
RemoveNodeStreams and the remote ReconfigureCMS path, and used by the 
completion handler. This preserves RESTORE_REPLICA_COUNT instead of falling 
back to OTHER. Request/response payloads and the description-based 
StreamInitMessage format are unchanged.

Regression coverage includes the message handler and completion payload, the MV 
write-path decision, actual data restoration during node removal, and remote 
CMS log streaming. The handler and both distributed regressions failed before 
the fix with expected RESTORE_REPLICA_COUNT but actual OTHER.

Local validation on OpenJDK 17.0.19 and Ant 1.10.13:
- Build passed.
- check-code passed (RAT and production/test Checkstyle).
- 9 unit tests passed: DataMovementVerbHandlerTest, 
CassandraStreamReceiverTest, StreamOperationTest.
- 2 JVM distributed tests passed: RemoveNodeStreamingTest, 
ReconfigureCMSStreamingTest.
- git diff --check passed.

The same parsing mismatch is present on cassandra-6.0 by source inspection; 
this PR is for trunk. Backport and mixed-version tests have not been run.

Full suites and community pre-commit CI have not been run. Could a reviewer or 
committer please run pre-commit CI for this patch and attach the CI artifacts? 
I do not currently have access to that CI system.

> RemoveNodeStreams and ReconfigureCMS RESTORE_REPLICA_COUNT streams received 
> by replicas are mis-parsed as OTHER.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21496
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21496
>             Project: Apache Cassandra
>          Issue Type: Bug
>            Reporter: Aleksey Yeschenko
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{RemoveNodeStreams#startStreaming()}} and {{ReconfigureCMS#streamRanges()}} 
> build an {{INITIATE_DATA_MOVEMENTS_REQ}} payload
> whose {{streamOperation}} field is set to 
> {{StreamOperation.RESTORE_REPLICA_COUNT.name()}}, i.e. the enum constant name 
> {{RESTORE_REPLICA_COUNT}}.
> {{DataMovementVerbHandler#doVerb()}} on the receiver parses that string with 
> {{StreamOperation.fromString(message.payload.streamOperation))}},
> incorrectly getting {{StreamOperation.OTHER}} (since 
> {{"RESTORE_REPLICA_COUNT" != "Restore replica count"}}).
> Current impact: this causes MVs to require rebuild unnecessarily on 
> removenode.
> Future impact: this affects CEP-45 topology change logic. I have a temporary 
> workaround there but it's inelegant.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to