andresbeckruiz commented on PR #4746: URL: https://github.com/apache/cassandra/pull/4746#issuecomment-4392531798
> Looks good, and great catch. Why don't we move the AbstractUpdater.reset() method up to `AbstractFastBuilder` though? I don't think there's a reason not to share it, and we only need to get the logic right once. It looks like we also are not clearing `hasRightChild` in the FastBuilder version, for instance. Sounds good, I moved `AbstractUpdater.reset()` up to `AbstractFastBuilder` along with helper methods `clearLeafBuffer` and `clearBranchBuffer`. Changes to `reset` now include: - Setting `leaf().count = 0` and `branch.count = 0`, as the `FastBuilder` does not call `completeBuild` on the exception path - `leaf().savedNextKey = null` and `branch.savedNextKey = null` which were missing from `AbstractUpdater.reset()` - Adding `leaf().savedBuffer[0] != null` guard for consistency with the branch logic Looks like `hasRightChild` was added in https://github.com/apache/cassandra/commit/7e32d92 for `cassandra-6.0` and `trunk`, so I will make a separate patch for those branches. That patch will also exclude the JVM Dtest test as the schema disagreement condition should not occur in these versions. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

