Skip to content

[WIP] Properly count amount of deleted deferred points - #8386

Merged
JojiiOfficial merged 5 commits into
correct-point-count-usage-deferred-pointsfrom
count-deleted-deferred-points
Mar 13, 2026
Merged

JojiiOfficial merged 5 commits into
correct-point-count-usage-deferred-pointsfrom
count-deleted-deferred-points

Conversation

@JojiiOfficial

Copy link
Copy Markdown
Member

[Wip]
Depends on #8366

Implements counting of deleted deferred points.

Currently we don't know the exact amount of visible and deferred points, without manually counting each time.
This PR adds a one-time counting at the segment creation/loading and then keeps track of deferred-point deletions.

This change allows us to accurately calculate the amount of visible and deferred points individually, which was only possible to estimate before.

@JojiiOfficial JojiiOfficial added this to the deferred updates milestone Mar 13, 2026
@JojiiOfficial
JojiiOfficial marked this pull request as ready for review March 13, 2026 16:03
@JojiiOfficial
JojiiOfficial merged commit e041666 into correct-point-count-usage-deferred-points Mar 13, 2026
14 checks passed
@JojiiOfficial
JojiiOfficial deleted the count-deleted-deferred-points branch March 13, 2026 16:18
JojiiOfficial added a commit that referenced this pull request Mar 13, 2026
* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue
JojiiOfficial added a commit that referenced this pull request Mar 16, 2026
* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue
JojiiOfficial added a commit that referenced this pull request Mar 19, 2026
* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue
JojiiOfficial added a commit that referenced this pull request Mar 19, 2026
* Don't account for deferred points in some places

# Conflicts:
#	lib/collection/src/shards/local_shard/scroll.rs

* Add in QueryContext

* Cover more places

* Coderabbit review remarks

* Properly count amount of deleted deferred points (#8386)

* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue

* Adjusts tests + fix issues

* Separte fields for deferred points in telemetry (SegmentInfo)

* Remove deferred_points_count()

* openapi

* Fix test by manually calculating visible points

* Adjust ProxySegment test to revertion of SegmentInfo

* Throw error if collection was not found in telemetry (e2e Test)

* Update lib/segment/src/segment/segment_ops.rs

Co-authored-by: Andrey Vasnetsov <[email protected]>

* Make new fields in API optional

* Don't take range if no deferred point exist

* Review remarks

---------

Co-authored-by: Andrey Vasnetsov <[email protected]>
generall added a commit that referenced this pull request Mar 26, 2026
* Don't account for deferred points in some places

# Conflicts:
#	lib/collection/src/shards/local_shard/scroll.rs

* Add in QueryContext

* Cover more places

* Coderabbit review remarks

* Properly count amount of deleted deferred points (#8386)

* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue

* Adjusts tests + fix issues

* Separte fields for deferred points in telemetry (SegmentInfo)

* Remove deferred_points_count()

* openapi

* Fix test by manually calculating visible points

* Adjust ProxySegment test to revertion of SegmentInfo

* Throw error if collection was not found in telemetry (e2e Test)

* Update lib/segment/src/segment/segment_ops.rs

Co-authored-by: Andrey Vasnetsov <[email protected]>

* Make new fields in API optional

* Don't take range if no deferred point exist

* Review remarks

---------

Co-authored-by: Andrey Vasnetsov <[email protected]>
KShivendu pushed a commit that referenced this pull request Mar 30, 2026
* Don't account for deferred points in some places

# Conflicts:
#	lib/collection/src/shards/local_shard/scroll.rs

* Add in QueryContext

* Cover more places

* Coderabbit review remarks

* Properly count amount of deleted deferred points (#8386)

* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue

* Adjusts tests + fix issues

* Separte fields for deferred points in telemetry (SegmentInfo)

* Remove deferred_points_count()

* openapi

* Fix test by manually calculating visible points

* Adjust ProxySegment test to revertion of SegmentInfo

* Throw error if collection was not found in telemetry (e2e Test)

* Update lib/segment/src/segment/segment_ops.rs

Co-authored-by: Andrey Vasnetsov <[email protected]>

* Make new fields in API optional

* Don't take range if no deferred point exist

* Review remarks

---------

Co-authored-by: Andrey Vasnetsov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant