Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spatial index populator and accessor now verifyDeferredConstraints
When populating uniqueness index with unique points that collided on the space filling curve the population would wrongly throw a constraint violation exception because it assumed that if two points collide on space filling curve they must be the same. This is not true. Points that are not equal can map to the same space filling curve tile. Spatial index need three changes to fix this: - Less strict value merger Spatial populator use a less strict ConflictDetectingValueMerger to allow collisions on the space filling curve. - Updater don't check for conflicts Spatial populating updater is not wrapped by a DeferredConflictCheckingIndexUpdater because it would only use index itself to verify conflicts. It would thus throw constraint violation exceptions without verifying that the points where in fact equal. - Spatial index population fall back to verifyDeferredConstraints This is the same way lucene index populator verify uniqueness for numbers. After population is complete and before constraint is created we scan index and for all points that collide on the space filling curve, we go to property store to check if the points are actually equal or not. If they are, we throw an constraint violation exception on the first violation we find. This is done both in SpatialIndexPopulator and SpatialIndexAccessor because there are two paths where vi verify constraints like this. 1. ConstraintIndexCreator -> OnlineIndexProxy -> IndexAccessor. 2. BatchInserterImpl -> FlippableIndexProxy -> PopulatingIndexProxy -> IndexPopulator NOTE! The other native indexes still function the same way, which is safe because they store the actual property values and can verify uniqueness exactly.
- Loading branch information
Showing
8 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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