Repository navigation
fix: realtime matching no longer throws after geospatial unsubscriptions - #2939
Merged
Merged
Conversation
koncorde 4.8.0-beta.1 → 4.8.0-beta.2, with boost-geospatial-index 1.5.0-beta.2 (kuzzleio/boost-geospatial-index#29, kuzzleio/koncorde#84). The geospatial index sometimes failed to remove a shape, whose id then kept matching without a subfilter behind it, and Koncorde#test threw "subfilters is not iterable". The notifier awaits that match on every document write (document:create → core:realtime:document:notify → notifyDocuments → _test), so the write request answered with an internal error after the document had been written, and no notification was sent. Reproduced on 2.56.0's koncorde 4.7.0: 2 000 geoDistance subscriptions, half removed, 5 000 documents → 62 throws on Node 22, 460 on Node 24. tests/util/koncordeCompat.test.ts runs that scenario through koncordeTest, the notifier's entry point. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…a status Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
|
🎉 This PR is included in version 2.57.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.57.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.



Bug (present in 2.56.0)
Once subscriptions with geospatial filters have been removed, matching a document can throw
TypeError: subfilters is not iterablein koncorde. The notifier awaits that match on every write —document:create→core:realtime:document:notify→notifyDocuments→_test→koncorde.test(), no catch on the way — so the API request fails with an internal error after the document was written, and no notification is sent for it.Reproduced with 2.56.0's koncorde 4.7.0: 2 000
geoDistancesubscriptions, half removed, 5 000 documents → 62 throws on Node 22, 460 on Node 24.Cause: boost-geospatial-index's R* tree sometimes failed to remove a shape (
rtree.remove()returned 0), so its id kept coming back without a subfilter. Fixed there, with regression tests at both levels:What
koncorde4.8.0-beta.1 → 4.8.0-beta.2 (brings boost 1.5.0-beta.2).tests/util/koncordeCompat.test.ts: the scenario above throughkoncordeTest, the notifier's entry point — no removed subscription may match, and it must not throw.npm ci#2839 and this fix.Verified
pr-preflight✅ · vitest in Docker ✅ 3 909 passed (one more than 2-dev) · CI runs the functional matrix.After this,
2-dev→betapublishes 2.57.0-beta.2.🤖 Generated with Claude Code