Repository navigation
GEODE-vector-pr3: Add gfsh Vector Index Commands, Cluster Configuration XML Persistence, and Vector Metrics (depends on #8154) - #8155
Draft
gouthamaenugu wants to merge 7 commits into
Conversation
added 3 commits
November 21, 2026 03:49
…d zero-copy PDX vector mapping
…paction for vector indexes
4 of 6 tasks
added 4 commits
November 25, 2026 01:17
….txt for VectorIndexMetadata
… XML persistence, and vector metrics
gouthamaenugu
force-pushed
the
feature/GEODE-vector-pr3-gfsh-cli
branch
from
November 25, 2026 09:20
5a23353 to
43391fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 3:
gfshVector Index Commands, Cluster Configuration XML Persistence, and Vector Metricsgouthamaenugu:feature/GEODE-vector-pr3-gfsh-clifeature/GEODE-vector-pr1-knn-field@be90eff48b); GitHub PR base set toapache:develop(46643af515)43391fee5b244c679c42e726389ef18d3324d194(28 files changed, +2150 / -68vs PR 1 GEODE-vector-pr1: Add KnnFloatVectorField, SQ8 Scalar Quantization Codec, Zero-Copy PDX Vector Mapping, and Bounded Segment Compaction #8154)geode-lucene(verified alongside:geode-gfsh:test)For all changes, please confirm:
GEODE-*JIRA ticket assignment and commit prefix update.)develop)? (Cleanly rebased on PR 1 GEODE-vector-pr1: Add KnnFloatVectorField, SQ8 Scalar Quantization Codec, Zero-Copy PDX Vector Mapping, and Bounded Segment Compaction #8154be90eff48b, which is based ondevelop46643af515.)assembly_content.txtIndex.VectorFieldJavadoc entry — ready to squash once GEODE-vector-pr1: Add KnnFloatVectorField, SQ8 Scalar Quantization Codec, Zero-Copy PDX Vector Mapping, and Bounded Segment Compaction #8154 merges.)gradlew buildrun cleanly? (Verified:geode-lucene:spotlessCheck,:geode-gfsh:spotlessCheck,:geode-lucene:checkPom,:geode-lucene:javadoc,:geode-lucene:test --rerun,:geode-gfsh:test,:geode-lucene:distributedTest, andAnalyzeLuceneSerializablesIntegrationTest.testSerializables.)9.12.3.)Summary / Motivation
Building on PR 1 (#8154)'s
VectorIndexMetadata,LuceneIndexFactory.addVectorField(...)API, and bounded vector segment compaction, operators need first-classgfshcommands, Cluster Configuration Service XML persistence, and JMX/MXBean observability to create, inspect, query, and monitor vector indexes across an Apache Geode cluster.This PR adds:
gfshCLI Support: Vector index creation (create lucene index --vector-field=...) and k-NN / filtered k-NN querying (search lucene --query-vector=... --vector-field=... --k=... --filter-query=...), plus vector metadata reporting indescribe lucene index/list lucene indexes.cache.xmlRound-Trip: Extendslucene-1.0.xsd, JAXBIndex/Index.VectorField,LuceneXmlParser, andLuceneIndexXmlGeneratorso vector indexes persist across locator restarts and automatically apply to newly joining servers.segmentMemoryBytes(backed by the LucenefileAndChunkRegionpartitioned datastore byte count) andvectorFieldsmetadata throughLuceneIndexStats,LuceneIndexStatsMonitor,LuceneIndexMetrics, andLuceneIndexDetails.Key Changes
gfshCommands, Functions & Query ExecutionLuceneCreateIndexCommand&LuceneCreateIndexFunction:--vector-fieldoption supportingname:dimension[:similarity[:sq8[:M[:efConstruction]]]]specs (repeatable/comma-separated), allowing pure-vector indexes without requiring--field.--vector-fieldnames, and overlap between--fieldand--vector-fieldwithUserErrorException.Index.VectorFielddefinitions into Cluster Configuration (updateConfigForGroup).LuceneSearchIndexCommand,LuceneSearchIndexFunction,LuceneQueryInfo, &VectorKnnQueryProvider:--query-vector,--vector-field,--k, and--filter-queryoptions.--limit <= 0, unmatched brackets, empty/trailing vector commas (split(",", -1)), and orphan--vector-field/--k/--filter-queryflags without--query-vector.LuceneSearchIndexFunctionrespectsqueryInfo.getLimit()while passingktoVectorKnnQueryProvider;VectorKnnQueryProvider.parseFilterQuerycloses fallbackStandardAnalyzercleanly via try-with-resources and fails fast on unqualified--filter-queryagainst pure-vector indexes.LuceneIndexInfo&LuceneIndexDetails:vectorFieldsmetadata and livesegmentMemoryBytes.XML Schema & Cluster Configuration Persistence
lucene-1.0.xsd,Index(Index.VectorField),LuceneXmlParser,LuceneIndexXmlGenerator,LuceneXmlConstants:<lucene:vector-field name="..." dimension="..." similarity="..." max-connections="..." beam-width="..." quantize-sq8="..."/>element tolucene-1.0.xsd(backward compatible with existingcache.xmldocuments).quantize-sq8(true/falseonly) and rejects duplicate<vector-field>definitions withCacheXmlException.Metrics & JMX Observability
LuceneIndexStats,LuceneIndexForPartitionedRegion,LuceneIndexStatsMonitor,StatsKey,LuceneIndexMetrics:volatile LongSupplierinLuceneIndexStatsconnected directly togetFileAndChunkRegion().getPrStats().getDataStoreBytesInUse(), ensuringgetSegmentMemoryBytes()reflects live memory usage even whenstatistic-sampling-enabled=false.getSegmentMemoryBytes()andgetVectorFields()onLuceneIndexMetricsMXBean CompositeType while retaining all legacy constructors for backward compatibility.New Unit & Distributed Tests (20 PR 3 Unit + 2 DUnit)
LuceneVectorCommandsJUnitTest(7 tests): CLI parsing, pure-vector index creation, duplicate/overlap rejection, malformed vector/bracket/limit validation, and search flag validation.LuceneVectorFunctionsJUnitTest(6 tests):LuceneCreateIndexFunction,LuceneSearchIndexFunctionlimit vsk,VectorKnnQueryProviderfiltered k-NN, and unqualified filter fail-fast checks.LuceneVectorMetricsJUnitTest(4 tests): livesegmentMemoryByteswithout statistics sampling,LuceneIndexStatsMonitor,LuceneIndexMetricsbackward-compatible constructors and MXBean getters.LuceneVectorXmlRoundTripJUnitTest(3 tests):cache.xml+LuceneIndexXmlGenerator/LuceneXmlParserround-trip, strictquantize-sq8validation, and duplicate<vector-field>rejection.LuceneVectorClusterConfigurationDUnitTest(2 DUnit tests): real locator + servers creating a vector index viagfsh, persisting XML in Cluster Configuration, joining a new server dynamically, and executingsearch lucene --query-vector=...end-to-end.Backward Compatibility & Serialization Notes
<lucene:vector-field>is optional (minOccurs="0" maxOccurs="unbounded") inlucene-1.0.xsd. LegacyLuceneIndexMetrics,LuceneIndexInfo,LuceneIndexDetails, andLuceneQueryInfoconstructors are preserved as delegating overloads.sanctioned-geode-lucene-serializables.txtforVectorKnnQueryProvider,Index,Index$VectorField,LuceneIndexInfo,LuceneIndexDetails, andLuceneQueryInfo, verified withAnalyzeLuceneSerializablesIntegrationTest.testSerializablesand real P2P serialization inLuceneVectorClusterConfigurationDUnitTest; addedjavadoc/org/apache/geode/cache/lucene/management/configuration/Index.VectorField.htmltogeode-assembly/src/integrationTest/resources/assembly_content.txt.Exact Gradle Verification Commands & Pass Counts
(Baseline counts captured on
5a23353669; follow-up commit43391fee5brebases onto PR 1be90eff48band adds theassembly_content.txtentry forIndex.VectorField.):geode-lucene:test --rerun:geode-gfsh:testLuceneVectorClusterConfigurationDUnitTest19.51s)AnalyzeLuceneSerializablesIntegrationTest.testSerializablesspotlessCheck(geode-lucene,geode-gfsh),checkPom,javadocPer-Suite Vector & DUnit Test Breakdown