Conversation
TabletMapSchemaChangeListener had no unit test: the integration test mocks it, so it only proved the driver calls it, never that it forwards. All four callbacks are covered here, including the two *Updated* ones that evict under the previous name, and the no-tablet-map early return. In DefaultTabletMap the untested parts were the second-sweep overlap eviction, removeByNode, and DefaultTablet's value methods. Closes all 15 missed lines from run 34559159215. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TabletMapSchemaChangeListenerhad no unit test at all.TabletMapSchemaChangesITmocks the listener out, so it proves the driver callsonKeyspaceDropped/onTableDroppedbut never that the listener forwards anything — theremoveByKeyspace/removeByTablecalls it makes were untested, as were its four no-tablet-map early returns.onKeyspaceUpdated/onTableUpdated, which evict under the previous name — the cached tablets are keyed by it.DefaultTabletMap: adds the second-sweep overlap eviction (a tablet overlapping only on its leading edge),removeByNode, andDefaultTablet'sequals/hashCode/toString.removeByTablematches on table name alone, so droppingks1.fooalso evictsks2.foo. The cost is a refetch, not mis-routing — recorded in a test comment, not filed as a defect.internal/core/metadata. The four existing methods inDefaultTabletMapTestmix JUnit withorg.testng.Assert, whoseassertEqualsargument order is reversed; converting them is churn inside a coverage PR, so it is left alone deliberately.Closes all 15 missed lines these two classes had in run 34559159215 (11 in
DefaultTabletMap, 4 in the listener), plus the listener's 4 partial branches andDefaultTabletMap's L118/L135/L273. Reported as missed lines closed rather than a percentage, because the #1025 DSE-removal stack moves the aggregate ~3.7pp on its own.Verified with
mvn clean test -pl core: 3980 tests, 0 failures (3968 on the base branch + 12 new). Per-class coverage confirmed fromjacoco.xmlunder-Pcoverage. No integration tests were run locally; the remainingparseTabletPayloadV1partials are IT-covered in CI and were already partial at baseline.Part of DRIVER-1000, one of five independent PRs off
scylla-4.x— not a stack; this one shares no file with the others.🤖 Generated with Claude Code