Repository navigation
Fix spatial index access after reopening MVStore files - #1334
Conversation
- Read persisted R-tree cursor keys through H2's Spatial interface. - Compare MVSpatialKey bounds with H2's deserialized spatial keys without unsafe casts. - Verify intersecting and contained queries, updates, removals and a second reopen on a real file. - Record the fix under Unreleased while preserving the on-disk format and public signatures. - Validate all 5455 MVStore adapter tests with zero failures or errors and one skip. Co-Authored-By: GPT-6.1-Sol high <noreply@openai.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Reopening an MVStore file with a spatial index can cause a
ClassCastExceptionfromDefaultSpatialtoMVSpatialKey. H2 reconstructs persisted keys using its ownSpatialimplementation; this change accepts those keys when querying and comparing bounds.I encountered this while working on Micronaut Data Nitrite, which integrates Nitrite with Micronaut Data repositories. This fixes the failure covered by its persisted spatial-index regression test.
Adds
ReopenedRTreeTestto cover queries, updates and removals after reopening, followed by a second reopen. The on-disk format is unchanged.Validation:
mvn -pl nitrite-mvstore-adapter -am -Dtest=ReopenedRTreeTest -Dsurefire.failIfNoSpecifiedTests=false test— passed, 1 test with no failures or skips.Summary by CodeRabbit