Skip to content

Admin interface#703

Open
MarkWolters wants to merge 6 commits into
mainfrom
admin_interface
Open

Admin interface#703
MarkWolters wants to merge 6 commits into
mainfrom
admin_interface

Conversation

@MarkWolters

Copy link
Copy Markdown
Contributor

JMX Runtime Configuration for Graph Index Builder

Introduces GraphIndexBuilderConfig, a JMX-managed singleton that exposes GraphIndexBuilder construction parameters as runtime-tunable attributes. Before this change, options such as addHierarchy, refineFinalGraph, parallelBuild, and build-time compression type could only be set at the call site and required a code change or restart to modify.

What's new

  • management packageGraphIndexBuilderConfigMBean declares 8 managed attributes across four groups (graph topology, write path, build compression type, PQ parameters); GraphIndexBuilderConfig is the singleton implementation registered under io.github.jbellis.jvector:type=GraphIndexBuilderConfig. CompressionType enum (NONE, PQ, BQ) drives build-time scoring compression selection.

  • GraphIndexBuilder — New constructor (RandomAccessVectorValues, VectorSimilarityFunction, …) reads addHierarchy, refineFinalGraph, and compression type from GraphIndexBuilderConfig at construction time. Existing constructors that accept those booleans explicitly are deprecated but unchanged in behavior. The new getBuildScoreProvider helper wires PQ and BQ build-time compression end-to-end using the JMX-configured parameters.

  • RandomAccessOnDiskGraphIndexWriter.Builder — Unified builder replaces the separate OnDiskGraphIndexWriter.Builder. Reads GraphIndexBuilderConfig.isParallelBuild() at build time to select OnDiskParallelGraphIndexWriter or OnDiskGraphIndexWriter. Both produce an identical on-disk format, so the flag can be toggled without re-indexing.

  • No breaking changes — All existing API call sites continue to compile and behave identically; deprecated constructors are retained and honor caller-supplied values.

Attributes managed via JMX

Attribute Type Default
AddHierarchy boolean true
RefineFinalGraph boolean true
ParallelBuild boolean false
BuildCompressionType String "NONE"
PqMFactor int 8
PqK int 256
PqCenterData boolean false
PqAnisotropicThreshold float -1.0

All attributes are @Experimental. MBean registration is best-effort — failure logs a warning but does not affect normal operation.

@github-actions

Copy link
Copy Markdown
Contributor

Before you submit for review:

  • Does your PR follow guidelines from CONTRIBUTIONS.md?
  • Did you summarize what this PR does clearly and concisely?
  • Did you include performance data for changes which may be performance impacting?
  • Did you include useful docs for any user-facing changes or features?
  • Did you include useful javadocs for developer oriented changes, explaining new concepts or key changes?
  • Did you rebase your branch onto the latest main for regression testing and PR submission?
  • Did you trigger regression testing via Run Bench Main and review results?
  • Did you adhere to the code formatting guidelines (TBD)
  • Did you group your changes for easy review, providing meaningful descriptions for each commit?
  • Did you ensure that all files contain the correct copyright header?
  • Did you add documentation for this feature to the release notes directory?

If you did not complete any of these, then please explain below.

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