Skip to content

Conversation

usamoi
Copy link
Contributor

@usamoi usamoi commented Mar 25, 2025

  • encode kmeans progress to build subphase names
  • add a new GUC vchordrq.prererank_filtering (default to off) to control prererank filtering

Kmeans progress phase names look like it.

usamoi=# select * from pg_stat_progress_create_index ;
  pid   | datid | datname |  relid  | index_relid | command |                            phase                             | lockers_total | lockers_done | current_locker_pid | blo
cks_total | blocks_done | tuples_total | tuples_done | partitions_total | partitions_done 
--------+-------+---------+---------+-------------+---------+--------------------------------------------------------------+---------------+--------------+--------------------+----
----------+-------------+--------------+-------------+------------------+-----------------
 156193 | 16385 | usamoi  | 1444276 |     3091227 | REINDEX | building index: initializing index, by internal build (60 %) |             0 |            0 |                  0 |    
        0 |           0 |      1000000 |           0 |                0 |               0
(1 row)

Signed-off-by: usamoi <usamoi@outlook.com>
@usamoi usamoi requested a review from Copilot March 25, 2025 08:47
Signed-off-by: usamoi <usamoi@outlook.com>
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR encodes KMeans progress into build subphase names and adds a new GUC to control prererank filtering. Key changes include refactoring the BuildPhase representations and reporter phase updates, updating hack pointer handling in the index access code, and adding a dependency on seq-macro.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/index/gucs.rs Added a new bool GUC vchordrq.prererank_filtering and defined its registry settings.
src/index/am/am_build.rs Refactored the build phase representation using BuildPhaseCode and updated phase reporting.
src/index/am/mod.rs Changed hack pointer handling from Option to raw pointer and updated its usage in fetch logic.
Cargo.toml Added dependency on seq-macro for generating progress phase name strings.
README.md Updated documentation regarding the capacity-optimized index configuration.
crates/k_means/src/lib.rs Changed the k_means check closure signature from Fn to FnMut.
Files not reviewed (1)
  • tests/logic/rerank_in_table.slt: Language not supported

@usamoi usamoi merged commit 0befc36 into tensorchord:main Mar 25, 2025
15 checks passed
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