Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage: Refine VectorIndexHNSW -> VectorIndex #9932

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

breezewish
Copy link
Member

@breezewish breezewish commented Feb 28, 2025

What problem does this PR solve?

Issue Number: ref #9032

Problem Summary:

What is changed and how it works?

1. VectorIndexHNSW -> VectorIndex

We dont need user to list HNSW explicitly. Prepare for AUTOINDEX.

2. VectorIndexWriter -> VectorIndexWriterInMemory & VectorIndexWriterOnDisk

This is to be aligned with FullTextIndexWriterInMemory|OnDisk.

Previously we always construct inMemory and optionally write to disk.

Now user must explicitly choose inMemory or onDisk when constructing the writer (although for the vector onDisk we still construct inMemory) because FTSIndex support fully construct ondisk.

3. LocalIndexViewer -> ICacheableLocalIndexReader

  • Viewer -> Reader, because it may be either inMemory or onDisk. "View" only stands for the mmap way and is not a correct word for it.

  • I: stands for a pure abstract base class (i.e. Interface) that meant to be derived instead of constructed directly. Similar to IColumn.

  • Cacheable: I think we only need it to provide necessary methods when put inside a LocalIndexCache. There is no need to put other common parts for a LocalIndexReader here. I expect to only have methods like getMemoryCost, etc. So let's call it ICacheableLocalIndexReader.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Feb 28, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 28, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Mar 3, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,Lloyd-Pottiger]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 3, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 3, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-28 08:20:30.407208833 +0000 UTC m=+603178.360367100: ☑️ agreed by Lloyd-Pottiger.
  • 2025-03-03 02:17:38.975329521 +0000 UTC m=+235172.104249264: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot merged commit f8906bb into pingcap:master Mar 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants