mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-26 20:51:08 -05:00
* test: add failing test for values_per_hash drift on duplicate geo point removal Reproduces the bug where `remove_point` only calls `decrement_hash_value_counts` once per unique geohash, while `add_many_geo_points` increments it once per value. When a point has duplicate geo coordinates (same geohash), the counters drift upward permanently after removal. Ref: https://github.com/qdrant/qdrant/pull/9033#discussion_r3241154045 Co-authored-by: Cursor <cursoragent@cursor.com> * fix: decrement values_per_hash once per value on geo point removal `add_many_geo_points` increments `values_per_hash` once per value, but `remove_point` deduplicated geohashes with a HashSet + `continue` that also skipped the per-value decrement. A point with duplicate geo coordinates (same geohash) therefore left the counters drifted upward permanently after removal. Move `decrement_hash_value_counts` above the dedup guard so it runs once per value, matching the increment side. `points_map` and `points_per_hash` track points, not values, so they stay deduplicated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Cursor Agent <agent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: generall <andrey@vasnetsov.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>