You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by al...@apache.org on 2026/09/22 22:39:55 UTC

(asterixdb) branch master updated: [NO ISSUE][STO] Tidy the VTree local resource

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 063142e68d [NO ISSUE][STO] Tidy the VTree local resource
063142e68d is described below

commit 063142e68d68b27bb50b2134d205c9abd8cc3b7b
Author: Le0shy <le...@gmail.com>
AuthorDate: Fri Sep 18 14:25:21 2026 -0700

    [NO ISSUE][STO] Tidy the VTree local resource
    
    - user model changes: no
    - storage format changes: yes
    - interface changes: yes
    
    Details:
    LSMVTreeLocalResource had accumulated second copies of facts it already persists, and read them back in three different styles, so the same question could be answered two ways depending on which field a caller reached for.
    
    Ext-ref: MB-73194
    Co-Authored-By: Claude Opus 5 <no...@anthropic.com>
    Change-Id: I706cf42e9845ba40e7fb37aa8a1701417df4f2c1
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21863
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Ali Alsuliman <al...@gmail.com>
---
 .../utils/VTreeResourceFactoryProvider.java        |  38 +--
 ...reeBulkLoaderAndGroupingOperatorDescriptor.java |  17 +-
 ...eeStaticStructureCreatorOperatorDescriptor.java |  44 +--
 .../lsm/vector/dataflow/LSMVTreeLocalResource.java | 369 +++++++--------------
 .../dataflow/LSMVTreeLocalResourceFactory.java     |  12 +-
 .../storage/am/lsm/vector/impls/LSMVTree.java      |   6 +-
 .../storage/am/lsm/vector/impls/VTreeFactory.java  |  10 +-
 .../storage/am/lsm/vector/utils/LSMVTreeUtils.java |   9 +-
 .../hyracks/storage/am/vector/impls/VTree.java     |  14 +-
 .../am/vector/utils/CrossPollinationConfig.java    |  61 +---
 .../hyracks-storage-am-lsm-vtree-test/pom.xml      |  10 +
 .../lsm/vector/LSMVTreeLocalResourceJsonTest.java  | 216 ++++++++++++
 .../am/lsm/vector/util/LSMVTreeTestContext.java    |  15 +-
 13 files changed, 422 insertions(+), 399 deletions(-)

diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/VTreeResourceFactoryProvider.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/VTreeResourceFactoryProvider.java
index e3d71c6bea..ca1f3a9136 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/VTreeResourceFactoryProvider.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/VTreeResourceFactoryProvider.java
@@ -57,8 +57,6 @@ import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTrackerFactory;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMPageWriteCallbackFactory;
 import org.apache.hyracks.storage.am.lsm.vector.dataflow.LSMVTreeLocalResourceFactory;
-import org.apache.hyracks.storage.am.vector.api.IVTreeDataTupleBuilderFactory;
-import org.apache.hyracks.storage.am.vector.impls.VTreeDataTupleBuilderFactory;
 import org.apache.hyracks.storage.am.vector.utils.CrossPollinationConfig;
 import org.apache.hyracks.storage.am.vector.utils.VTreeDataTupleAccessor;
 import org.apache.hyracks.storage.common.IResourceFactory;
@@ -98,15 +96,9 @@ public class VTreeResourceFactoryProvider implements IResourceFactoryProvider {
         List<List<String>> primaryKeyFields = dataset.getPrimaryKeys();
         int numPrimaryKeys = primaryKeyFields.size();
 
-        // Determine data tuple creator factory based on whether the index is quantized. The primary key
-        // is what completes the storage layer's ordering key, so its field count is handed over here.
+        // The primary key is what completes the storage layer's ordering key, so a quantized index lays its
+        // data tuples out differently and the identity-field positions shift.
         boolean isQuantized = vectorParameters.isQuantized();
-        IVTreeDataTupleBuilderFactory dataTupleBuilderFactory;
-        if (isQuantized) {
-            dataTupleBuilderFactory = new VTreeDataTupleBuilderFactory(numIncludeFields, numPrimaryKeys, true);
-        } else {
-            dataTupleBuilderFactory = new VTreeDataTupleBuilderFactory(numIncludeFields, numPrimaryKeys, false);
-        }
 
         IStorageComponentProvider storageComponentProvider = mdProvider.getStorageComponentProvider();
         ITypeTraitProvider typeTraitProvider = mdProvider.getDataFormat().getTypeTraitProvider();
@@ -151,23 +143,13 @@ public class VTreeResourceFactoryProvider implements IResourceFactoryProvider {
             // after the resource is reconstituted from JSON (e.g., after NC restart).
             VectorSimilarityMetric distanceMetric = vectorParameters.getSimilarity();
 
-            // Cross-pollination placement: read the SAME WITH-clause params (with the SAME defaults) that
-            // the bulk-load job uses in SecondaryVectorOperationsHelper#buildLoadingJobSpec, so incremental
-            // insert/delete resolve the identical M leaf clusters per record. Drift here would let a delete
-            // miss replicas (leaked deletes) — keep these three reads in lock-step with the bulk-load helper.
-            //
-            // All three are read unconditionally, at every M. This used to be gated on M > 1, falling back
-            // to a shared default config otherwise — exactly the drift this comment warns about, because
-            // epsilon prunes the level-wise descent at every M (VTree#findReplicaClusters runs the same
-            // navigation for M == 1, it does not shortcut) and that default's epsilon differed from the
-            // DDL's. An index created with the default M == 1 was therefore bulk-loaded with one window and
-            // had its deletes resolved with another, letting antimatter land in a different leaf cluster
-            // than the matter it had to cancel. CrossPollinationConfig now has no default at all, so the
-            // DDL is the only source; VTree#findReplicaClusters records the same failure from its earlier
-            // cause.
-            CrossPollinationConfig crossPollination =
-                    new CrossPollinationConfig(vectorParameters.getCrossPollinationM(), vectorParameters.getRngFactor(),
-                            vectorParameters.getEpsilon());
+            // Placement parameters: read the same WITH-clause values, at every M, that the bulk-load job
+            // reads in SecondaryVectorOperationsHelper#buildLoadingJobSpec, so incremental insert and delete
+            // resolve the leaf clusters bulk-load placed the records in. Keep the reads in lock-step with
+            // that helper; drift here lets a delete miss replicas.
+            CrossPollinationConfig crossPollination = new CrossPollinationConfig(
+                    vectorParameters.getCrossPollinationM(), vectorParameters.getRngFactor());
+            double epsilon = vectorParameters.getEpsilon();
 
             // Create vector accessor factory for extracting vectors from ADM ordered lists
             AOrderedListVectorBinaryAccessorFactory vectorAccessorFactory =
@@ -187,7 +169,7 @@ public class VTreeResourceFactoryProvider implements IResourceFactoryProvider {
                     mergePolicyProperties, true, vectorDimensions, vectorFields,
                     typeTraitProvider.getTypeTrait(BuiltinType.ANULL), NullIntrospector.INSTANCE, atomic,
                     vectorAccessorFactory, VTreeDataTupleAccessor.identityFields(isQuantized, numPrimaryKeys),
-                    numIncludeFields, dataTupleBuilderFactory, distanceFunctionFactory, crossPollination);
+                    numIncludeFields, distanceFunctionFactory, crossPollination, epsilon);
         } else {
             return null;
         }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeBulkLoaderAndGroupingOperatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeBulkLoaderAndGroupingOperatorDescriptor.java
index 8a283a7054..85c50a9098 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeBulkLoaderAndGroupingOperatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeBulkLoaderAndGroupingOperatorDescriptor.java
@@ -65,6 +65,7 @@ import org.apache.hyracks.storage.am.lsm.vector.dataflow.LSMVTreeLocalResource;
 import org.apache.hyracks.storage.am.lsm.vector.impls.LSMVTree;
 import org.apache.hyracks.storage.am.lsm.vector.impls.LSMVTreeDiskComponent;
 import org.apache.hyracks.storage.am.vector.api.IVTreeDistanceFunction;
+import org.apache.hyracks.storage.am.vector.api.VTreeQuantizationParams;
 import org.apache.hyracks.storage.am.vector.impls.ClusterSearchResult;
 import org.apache.hyracks.storage.am.vector.impls.VTree;
 import org.apache.hyracks.storage.am.vector.utils.RngAcceptanceFilter;
@@ -490,23 +491,15 @@ public class VTreeBulkLoaderAndGroupingOperatorDescriptor extends AbstractSingle
                                 + (resource == null ? "null" : resource.getClass().getName())));
             }
 
-            if (!vcResource.hasQuantizationParams()) {
+            VTreeQuantizationParams params = vcResource.getQuantizationParams();
+            if (params == null) {
                 // TODO(vector-errors): uncoded IllegalStateException -> reaches the user as "Internal error".
                 throw HyracksDataException
                         .create(new IllegalStateException("Quantized VTree resource is missing quantization params"));
             }
 
-            // hasQuantizationParams() guarantees these are non-null; sampleCount is optional.
-            Integer bits = vcResource.getBits();
-            Float confidenceInterval = vcResource.getConfidenceInterval();
-            Float minQuantile = vcResource.getMinQuantile();
-            Float maxQuantile = vcResource.getMaxQuantile();
-            Float alpha = vcResource.getAlpha();
-            Integer sampleCount = vcResource.getSampleCount();
-            int finalSampleCount = (sampleCount != null) ? sampleCount : 20000;
-
-            return new OptimizedScalarQuantizationCodec.Params(bits, vectorDimension, finalSampleCount,
-                    confidenceInterval, minQuantile, maxQuantile, alpha);
+            return new OptimizedScalarQuantizationCodec.Params(params.bits(), vectorDimension, params.sampleCount(),
+                    params.confidenceInterval(), params.minQuantile(), params.maxQuantile(), params.alpha());
         }
 
         /**
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeStaticStructureCreatorOperatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeStaticStructureCreatorOperatorDescriptor.java
index ed535a5840..39f89595e7 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeStaticStructureCreatorOperatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeStaticStructureCreatorOperatorDescriptor.java
@@ -71,6 +71,7 @@ import org.apache.hyracks.storage.am.lsm.common.api.ILSMIndex;
 import org.apache.hyracks.storage.am.lsm.common.impls.LSMComponentId;
 import org.apache.hyracks.storage.am.lsm.vector.dataflow.LSMVTreeLocalResource;
 import org.apache.hyracks.storage.am.lsm.vector.impls.LSMVTree;
+import org.apache.hyracks.storage.am.vector.api.VTreeQuantizationParams;
 import org.apache.hyracks.storage.common.IIndex;
 import org.apache.hyracks.storage.common.IIndexBulkLoader;
 import org.apache.hyracks.storage.common.IResource;
@@ -200,40 +201,17 @@ public class VTreeStaticStructureCreatorOperatorDescriptor extends AbstractOpera
                                 DatasetLocalResource datasetResource = (DatasetLocalResource) resource;
                                 IResource delegate = datasetResource.getResource();
                                 if (delegate instanceof LSMVTreeLocalResource) {
-                                    LSMVTreeLocalResource vcTreeResource = (LSMVTreeLocalResource) delegate;
-
-                                    // Read quantization parameters with defaults
-                                    Integer bits = vcTreeResource.getBits();
-                                    if (bits != null) {
-                                        quantizationBits = bits;
-                                    }
-
-                                    Float ci = vcTreeResource.getConfidenceInterval();
-                                    if (ci != null) {
-                                        confidenceInterval = ci;
-                                    }
-
-                                    Float minQ = vcTreeResource.getMinQuantile();
-                                    if (minQ != null) {
-                                        minQuantile = minQ;
-                                    }
-
-                                    Float maxQ = vcTreeResource.getMaxQuantile();
-                                    if (maxQ != null) {
-                                        maxQuantile = maxQ;
-                                    }
-
-                                    Float a = vcTreeResource.getAlpha();
-                                    if (a != null) {
-                                        alpha = a;
+                                    VTreeQuantizationParams params =
+                                            ((LSMVTreeLocalResource) delegate).getQuantizationParams();
+                                    if (params != null) {
+                                        quantizationBits = params.bits();
+                                        confidenceInterval = params.confidenceInterval();
+                                        minQuantile = params.minQuantile();
+                                        maxQuantile = params.maxQuantile();
+                                        alpha = params.alpha();
+                                        sampleCount = params.sampleCount();
+                                        quantizationParamsLoaded = true;
                                     }
-
-                                    Integer sc = vcTreeResource.getSampleCount();
-                                    if (sc != null) {
-                                        sampleCount = sc;
-                                    }
-
-                                    quantizationParamsLoaded = vcTreeResource.hasQuantizationParams();
                                 }
                             }
                         }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResource.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResource.java
index 09c5216799..daeb087996 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResource.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResource.java
@@ -46,14 +46,12 @@ import org.apache.hyracks.storage.am.lsm.common.dataflow.LsmResource;
 import org.apache.hyracks.storage.am.lsm.vector.utils.LSMVTreeUtils;
 import org.apache.hyracks.storage.am.vector.api.IQuantizedResource;
 import org.apache.hyracks.storage.am.vector.api.IVTreeBinaryAccessorFactory;
-import org.apache.hyracks.storage.am.vector.api.IVTreeDataTupleBuilderFactory;
 import org.apache.hyracks.storage.am.vector.api.IVTreeDistanceFunctionFactory;
 import org.apache.hyracks.storage.am.vector.api.VTreeQuantizationParams;
 import org.apache.hyracks.storage.am.vector.impls.VTreeDataTupleBuilderFactory;
 import org.apache.hyracks.storage.am.vector.utils.CrossPollinationConfig;
 import org.apache.hyracks.storage.common.IIndex;
 import org.apache.hyracks.storage.common.IStorageManager;
-import org.apache.hyracks.util.annotations.AiProvenance;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -62,56 +60,56 @@ public class LSMVTreeLocalResource extends LsmResource implements IQuantizedReso
 
     private static final long serialVersionUID = 2L;
 
-    // Persisted/wire key names for quantization parameters. Shared with QuantizedIndexCreate so
-    // the producer and the persisted resource agree on the vocabulary.
-    public static final String KEY_MIN_QUANTILE = "minQuantile";
-    public static final String KEY_MAX_QUANTILE = "maxQuantile";
-    public static final String KEY_ALPHA = "alpha";
-    public static final String KEY_BITS = "bits";
-    public static final String KEY_CONFIDENCE_INTERVAL = "confidenceInterval";
-    public static final String KEY_SAMPLE_COUNT = "sampleCount";
-
     private static final double BLOOM_FILTER_FALSE_POSITIVE_RATE = 0.01;
-    /** JSON key under which the vector accessor factory is persisted. */
+
+    private static final String KEY_VECTOR_DIMENSIONS = "vectorDimensions";
+    private static final String KEY_VECTOR_FIELDS = "vectorFields";
+    private static final String KEY_ATOMIC = "atomic";
+    private static final String KEY_IDENTITY_FIELDS = "identityFields";
+    private static final String KEY_NUM_INCLUDE_FIELDS = "numIncludeFields";
     private static final String KEY_VECTOR_ACCESSOR_FACTORY = "vectorAccessorFactory";
-    /** JSON key under which the distance-function factory is persisted. */
     private static final String KEY_DISTANCE_FUNCTION_FACTORY = "distanceFunctionFactory";
-    /** JSON keys for the cross-pollination placement parameters (see {@link CrossPollinationConfig}). */
     private static final String KEY_CROSS_POLLINATION_M = "crossPollinationM";
     private static final String KEY_RNG_FACTOR = "rngFactor";
     private static final String KEY_EPSILON = "epsilon";
+    private static final String KEY_QUANTIZATION = "quantization";
+    private static final String KEY_MIN_QUANTILE = "minQuantile";
+    private static final String KEY_MAX_QUANTILE = "maxQuantile";
+    private static final String KEY_ALPHA = "alpha";
+    private static final String KEY_CONFIDENCE_INTERVAL = "confidenceInterval";
+    private static final String KEY_BITS = "bits";
+    private static final String KEY_SAMPLE_COUNT = "sampleCount";
 
     protected final int vectorDimensions;
     protected final int[] vectorFields;
-    protected final int[] filterFields;
     protected final boolean atomic;
     protected final IVTreeBinaryAccessorFactory vectorAccessorFactory;
     /** Positions of the identity fields within a data tuple; the ordering key is distance plus these. */
     protected final int[] identityFields;
-    /** How many INCLUDE fields the *input* tuple carries; an input-layout fact, used by the tuple builder. */
+    /** How many INCLUDE fields the <em>input</em> tuple carries; an input-layout fact for the tuple builder. */
     protected final int numIncludeFields;
-    protected final IVTreeDataTupleBuilderFactory dataTupleBuilderFactory;
 
     /**
-     * Distance-function factory supplied at DDL time. Persisted via the resource registry so a
-     * restarted index reconstructs the same distance implementation.
+     * Distance-function factory supplied at DDL time. Persisted so a restarted index reconstructs the
+     * same distance implementation.
      */
     protected final IVTreeDistanceFunctionFactory distanceFunctionFactory;
 
     /**
-     * Cross-pollination placement config supplied at DDL time; never {@code null}. All three values are
-     * persisted to JSON — at every {@code M}, not only when replication is on — so that incremental
-     * insert/delete on a restarted index resolve the same leaf clusters bulk-load used.
+     * Cross-pollination placement config supplied at DDL time; never {@code null}. Persisted so that
+     * incremental insert and delete on a restarted index resolve the leaf clusters bulk-load used.
      */
     protected final CrossPollinationConfig crossPollination;
 
-    // Quantization parameters (optional, set by QuantizedIndexCreate during index creation)
-    protected Float confidenceInterval;
-    protected Float minQuantile;
-    protected Float maxQuantile;
-    protected Float alpha;
-    protected Integer bits;
-    protected Integer sampleCount;
+    /** Level-wise candidate window from the DDL; persisted for the same reason as {@link #crossPollination}. */
+    protected final double epsilon;
+
+    /**
+     * Scalar-quantization calibration, or {@code null} for a non-quantized index. Written once by
+     * {@link QuantizedIndexBuilder} between resource creation and the first {@link #createInstance}, so
+     * its presence is the single answer to whether this index is quantized.
+     */
+    protected VTreeQuantizationParams quantization;
 
     public LSMVTreeLocalResource(String path, IStorageManager storageManager, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] cmpFactories, ITypeTraits[] filterTypeTraits,
@@ -123,56 +121,39 @@ public class LSMVTreeLocalResource extends LsmResource implements IQuantizedReso
             Map<String, String> mergePolicyProperties, boolean durable, int vectorDimensions, int[] vectorFields,
             ITypeTraits nullTypeTraits, INullIntrospector nullIntrospector, boolean atomic,
             IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] identityFields, int numIncludeFields,
-            IVTreeDataTupleBuilderFactory dataTupleBuilderFactory,
-            IVTreeDistanceFunctionFactory distanceFunctionFactory, Float confidenceInterval, Float minQuantile,
-            Float maxQuantile, Float alpha, Integer bits, Integer sampleCount,
-            CrossPollinationConfig crossPollination) {
+            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination,
+            double epsilon) {
         super(path, storageManager, typeTraits, cmpFactories, filterTypeTraits, filterCmpFactories, filterFields,
                 opTrackerProvider, ioOpCallbackFactory, pageWriteCallbackFactory, metadataPageManagerFactory,
                 vbcProvider, ioSchedulerProvider, mergePolicyFactory, mergePolicyProperties, durable, nullTypeTraits,
                 nullIntrospector);
         this.vectorDimensions = vectorDimensions;
         this.vectorFields = vectorFields;
-        this.filterFields = filterFields;
         this.atomic = atomic;
-        this.distanceFunctionFactory = distanceFunctionFactory;
-        this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
-        this.confidenceInterval = confidenceInterval;
-        this.minQuantile = minQuantile;
-        this.maxQuantile = maxQuantile;
-        this.alpha = alpha;
-        this.bits = bits;
-        this.sampleCount = sampleCount;
-        this.vectorAccessorFactory = vectorAccessorFactory;
-        this.identityFields = identityFields;
+        this.vectorAccessorFactory = Objects.requireNonNull(vectorAccessorFactory, "vectorAccessorFactory");
+        this.identityFields = Objects.requireNonNull(identityFields, "identityFields");
         this.numIncludeFields = numIncludeFields;
-        this.dataTupleBuilderFactory = dataTupleBuilderFactory;
+        this.distanceFunctionFactory = Objects.requireNonNull(distanceFunctionFactory, "distanceFunctionFactory");
+        this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
+        this.epsilon = epsilon;
     }
 
     protected LSMVTreeLocalResource(IPersistedResourceRegistry registry, JsonNode json, int vectorDimensions,
-            int[] vectorFields, int[] filterFields, boolean atomic, Float confidenceInterval, Float minQuantile,
-            Float maxQuantile, Float alpha, Integer bits, Integer sampleCount,
-            IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] identityFields, int numIncludeFields,
-            IVTreeDataTupleBuilderFactory dataTupleBuilderFactory,
-            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination)
+            int[] vectorFields, boolean atomic, IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] identityFields,
+            int numIncludeFields, IVTreeDistanceFunctionFactory distanceFunctionFactory,
+            CrossPollinationConfig crossPollination, double epsilon, VTreeQuantizationParams quantization)
             throws HyracksDataException {
         super(registry, json);
         this.vectorDimensions = vectorDimensions;
         this.vectorFields = vectorFields;
-        this.filterFields = filterFields;
         this.atomic = atomic;
-        this.distanceFunctionFactory = distanceFunctionFactory;
-        this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
-        this.confidenceInterval = confidenceInterval;
-        this.minQuantile = minQuantile;
-        this.maxQuantile = maxQuantile;
-        this.alpha = alpha;
-        this.bits = bits;
-        this.sampleCount = sampleCount;
-        this.vectorAccessorFactory = vectorAccessorFactory;
-        this.identityFields = identityFields;
+        this.vectorAccessorFactory = Objects.requireNonNull(vectorAccessorFactory, "vectorAccessorFactory");
+        this.identityFields = Objects.requireNonNull(identityFields, "identityFields");
         this.numIncludeFields = numIncludeFields;
-        this.dataTupleBuilderFactory = dataTupleBuilderFactory;
+        this.distanceFunctionFactory = Objects.requireNonNull(distanceFunctionFactory, "distanceFunctionFactory");
+        this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
+        this.epsilon = epsilon;
+        this.quantization = quantization;
     }
 
     @Override
@@ -185,226 +166,109 @@ public class LSMVTreeLocalResource extends LsmResource implements IQuantizedReso
         ioOpCallbackFactory.initialize(ncServiceCtx, this);
         pageWriteCallbackFactory.initialize(ncServiceCtx, this);
 
-        // Construction-time invariant: vectorAccessorFactory is always supplied — by
-        // VTreeResourceFactoryProvider in production and by the test harness in tests, and round-
-        // tripped through the resource registry on JSON read. A null here indicates a corrupted
-        // resource (e.g., a JSON file with the {@link #KEY_VECTOR_ACCESSOR_FACTORY} key missing).
-        if (vectorAccessorFactory == null) {
-            throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
-                    "The vector accessor factory is missing from the resource at " + path);
-        }
-        // Distance-function factory is always supplied at DDL and round-tripped through the registry;
-        // a null indicates a corrupted or unsupported-version resource.
-        if (distanceFunctionFactory == null) {
-            throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
-                    "The distance-function factory is missing from the resource at " + path);
-        }
-
-        // Quantization params for lazy quantizer creation at query time
-        VTreeQuantizationParams quantizationParams = null;
-        if (hasQuantizationParams()) {
-            quantizationParams =
-                    new VTreeQuantizationParams(minQuantile, maxQuantile, alpha, confidenceInterval, bits, sampleCount);
-        }
+        // The tuple layout follows from the persisted facts, so it is rebuilt here rather than carried as a
+        // second copy of them.
+        VTreeDataTupleBuilderFactory dataTupleBuilderFactory =
+                new VTreeDataTupleBuilderFactory(numIncludeFields, identityFields.length, quantization != null);
 
+        // A VTree has no LSM component filter; the base carries the filter traits only because every
+        // LsmResource does.
         return LSMVTreeUtils.createLSMTree(storageConfig, ioManager, virtualBufferCaches, fileRef,
                 storageManager.getBufferCache(ncServiceCtx), typeTraits, cmpFactories, BLOOM_FILTER_FALSE_POSITIVE_RATE,
                 mergePolicyFactory.createMergePolicy(mergePolicyProperties, ncServiceCtx),
                 opTrackerProvider.getOperationTracker(ncServiceCtx, this),
                 ioSchedulerProvider.getIoScheduler(ncServiceCtx), ioOpCallbackFactory, pageWriteCallbackFactory,
-                vectorDimensions, vectorFields, filterFields, null, // filterFrameFactory
-                null, // filterManager
-                null, // filterHelper
-                durable, metadataPageManagerFactory, atomic, null, vectorAccessorFactory, identityFields,
-                dataTupleBuilderFactory, quantizationParams, distanceFunctionFactory, crossPollination);
+                vectorDimensions, vectorFields, filterFields, null, null, null, durable, metadataPageManagerFactory,
+                atomic, null, vectorAccessorFactory, identityFields, dataTupleBuilderFactory, quantization,
+                distanceFunctionFactory, crossPollination, epsilon);
     }
 
     @Override
     public JsonNode toJson(IPersistedResourceRegistry registry) throws HyracksDataException {
         ObjectNode jsonObject = registry.getClassIdentifier(getClass(), serialVersionUID);
-        appendToJson(jsonObject, registry); // Call this.appendToJson() to include quantization params
+        appendToJson(jsonObject, registry);
         return jsonObject;
     }
 
     @Override
-    @AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_5, tool = AiProvenance.Tool.CLAUDE_CODE_UI, contributionKind = AiProvenance.ContributionKind.ASSISTED, notes = "Persist the cross-pollination params at every M, so a restarted NC reconstructs the "
-            + "window the index was bulk-loaded with")
     protected void appendToJson(final ObjectNode json, IPersistedResourceRegistry registry)
             throws HyracksDataException {
         super.appendToJson(json, registry);
-        json.put("vectorDimensions", vectorDimensions);
-        json.putPOJO("vectorFields", vectorFields);
-        json.putPOJO("filterFields", filterFields);
-        json.put("atomic", atomic);
-        // Cross-pollination placement params — always persisted, including at M == 1, and read back with
-        // no default (see fromJson). epsilon prunes the level-wise descent at every M, so writing these
-        // only when replication was on left a restarted NC reconstructing the index with a different
-        // window than it was bulk-loaded with, which leaks deletes.
+        json.put(KEY_VECTOR_DIMENSIONS, vectorDimensions);
+        json.putPOJO(KEY_VECTOR_FIELDS, vectorFields);
+        json.put(KEY_ATOMIC, atomic);
+        json.putPOJO(KEY_IDENTITY_FIELDS, identityFields);
+        json.put(KEY_NUM_INCLUDE_FIELDS, numIncludeFields);
+        // The placement parameters are written at every M. A restarted NC that reconstructed the index with
+        // a different window than bulk-load used would resolve a delete to another leaf cluster and leak it.
+        json.put(KEY_EPSILON, epsilon);
         json.put(KEY_CROSS_POLLINATION_M, crossPollination.m());
         json.put(KEY_RNG_FACTOR, crossPollination.rngFactor());
-        json.put(KEY_EPSILON, crossPollination.epsilon());
-        // Vector accessor factory — round-tripped via IPersistedResourceRegistry. The factory
-        // implementation (AOrderedListVectorBinaryAccessorFactory) must be registered with the
-        // registry; see PersistedResourceRegistry#registerClasses.
-        if (vectorAccessorFactory != null) {
-            json.set(KEY_VECTOR_ACCESSOR_FACTORY, vectorAccessorFactory.toJson(registry));
-        }
-        // Distance-function factory — round-tripped via the registry (implementation must be
-        // registered; see PersistedResourceRegistry#registerClasses).
-        if (distanceFunctionFactory != null) {
-            json.set(KEY_DISTANCE_FUNCTION_FACTORY, distanceFunctionFactory.toJson(registry));
+        // Both factories round-trip through the registry, so their implementations must be registered there;
+        // see PersistedResourceRegistry#registerClasses.
+        json.set(KEY_VECTOR_ACCESSOR_FACTORY, vectorAccessorFactory.toJson(registry));
+        json.set(KEY_DISTANCE_FUNCTION_FACTORY, distanceFunctionFactory.toJson(registry));
+        if (quantization != null) {
+            ObjectNode quantizationNode = OBJECT_MAPPER.createObjectNode();
+            quantizationNode.put(KEY_MIN_QUANTILE, quantization.minQuantile());
+            quantizationNode.put(KEY_MAX_QUANTILE, quantization.maxQuantile());
+            quantizationNode.put(KEY_ALPHA, quantization.alpha());
+            quantizationNode.put(KEY_CONFIDENCE_INTERVAL, quantization.confidenceInterval());
+            quantizationNode.put(KEY_BITS, quantization.bits());
+            quantizationNode.put(KEY_SAMPLE_COUNT, quantization.sampleCount());
+            json.set(KEY_QUANTIZATION, quantizationNode);
         }
-        // Write quantization parameters only when set (a non-quantized index has none).
-        putIfNotNull(json, KEY_CONFIDENCE_INTERVAL, confidenceInterval);
-        putIfNotNull(json, KEY_MIN_QUANTILE, minQuantile);
-        putIfNotNull(json, KEY_MAX_QUANTILE, maxQuantile);
-        putIfNotNull(json, KEY_ALPHA, alpha);
-        putIfNotNull(json, KEY_BITS, bits);
-        putIfNotNull(json, KEY_SAMPLE_COUNT, sampleCount);
-        json.putPOJO("identityFields", identityFields);
-        json.put("numIncludeFields", numIncludeFields);
     }
 
-    @AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_5, tool = AiProvenance.Tool.CLAUDE_CODE_UI, contributionKind = AiProvenance.ContributionKind.ASSISTED, notes = "Fall back to CrossPollinationConfig's shared placement defaults rather than local "
-            + "literals that can disagree with the WITH-clause defaults")
     public static IJsonSerializable fromJson(IPersistedResourceRegistry registry, JsonNode json)
             throws HyracksDataException {
-        // appendToJson always writes vectorDimensions and the field layout, so a missing one means the
-        // resource is corrupt. Reject it here rather than let a default silently mis-key the index.
-        if (!json.has("vectorDimensions") || json.get("vectorDimensions").asInt() <= 0) {
-            throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
-                    "LSMVTreeLocalResource is missing or has a non-positive vectorDimensions; resource is corrupt");
-        }
-        int vectorDimensions = json.get("vectorDimensions").asInt();
-        if (!json.has("identityFields") || !json.has("numIncludeFields")) {
-            throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
-                    "LSMVTreeLocalResource is missing its field layout (identityFields, numIncludeFields); "
-                            + "resource is corrupt");
-        }
-        int[] identityFields = OBJECT_MAPPER.convertValue(json.get("identityFields"), int[].class);
-        int numIncludeFields = json.get("numIncludeFields").asInt();
-        int[] vectorFields =
-                json.has("vectorFields") ? OBJECT_MAPPER.convertValue(json.get("vectorFields"), int[].class) : null;
-        int[] filterFields =
-                json.has("filterFields") ? OBJECT_MAPPER.convertValue(json.get("filterFields"), int[].class) : null;
-        boolean atomic = json.has("atomic") && json.get("atomic").asBoolean();
-
-        // Vector accessor factory — required on read; createInstance() throws if absent. New
-        // resources always carry it (see appendToJson). A missing key indicates a corrupted or
-        // unsupported-version JSON file.
-        IVTreeBinaryAccessorFactory vectorAccessorFactory = json.has(KEY_VECTOR_ACCESSOR_FACTORY)
-                ? (IVTreeBinaryAccessorFactory) registry.deserialize(json.get(KEY_VECTOR_ACCESSOR_FACTORY)) : null;
-
-        // Distance-function factory — required on read; createInstance() throws if absent. New resources
-        // always carry it. Missing key => corrupted or unsupported-version JSON.
-        IVTreeDistanceFunctionFactory distanceFunctionFactory = json.has(KEY_DISTANCE_FUNCTION_FACTORY)
-                ? (IVTreeDistanceFunctionFactory) registry.deserialize(json.get(KEY_DISTANCE_FUNCTION_FACTORY)) : null;
-
-        // Read quantization parameters with backward compatibility (missing → null).
-        Float confidenceInterval = readOptionalFloat(json, KEY_CONFIDENCE_INTERVAL);
-        Float minQuantile = readOptionalFloat(json, KEY_MIN_QUANTILE);
-        Float maxQuantile = readOptionalFloat(json, KEY_MAX_QUANTILE);
-        Float alpha = readOptionalFloat(json, KEY_ALPHA);
-        Integer bits = readOptionalInt(json, KEY_BITS);
-        Integer sampleCount = readOptionalInt(json, KEY_SAMPLE_COUNT);
-        // Determine quantized vs non-quantized based on presence of quantization parameters
-        boolean isQuantized = (minQuantile != null);
-        IVTreeDataTupleBuilderFactory dataTupleBuilderFactory =
-                new VTreeDataTupleBuilderFactory(numIncludeFields, identityFields.length, isQuantized);
-
-        // Cross-pollination params. appendToJson writes all three unconditionally, so their absence means
-        // the resource is corrupt or foreign — fail fast, exactly as vectorDimensions and the two factories
-        // above do. Substituting a default here would make this a second source of truth for a value that
-        // must agree with what bulk-load placed the records by, and the delete path would silently resolve
-        // a different leaf cluster than the matter it has to cancel.
-        if (!json.has(KEY_CROSS_POLLINATION_M) || !json.has(KEY_RNG_FACTOR) || !json.has(KEY_EPSILON)) {
+        int vectorDimensions = require(json, KEY_VECTOR_DIMENSIONS).asInt();
+        if (vectorDimensions <= 0) {
             throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
-                    "LSMVTreeLocalResource is missing its cross-pollination placement parameters ("
-                            + KEY_CROSS_POLLINATION_M + ", " + KEY_RNG_FACTOR + ", " + KEY_EPSILON
-                            + "); resource is corrupt");
+                    "LSMVTreeLocalResource carries a non-positive " + KEY_VECTOR_DIMENSIONS + "; resource is corrupt");
         }
-        CrossPollinationConfig crossPollination = new CrossPollinationConfig(json.get(KEY_CROSS_POLLINATION_M).asInt(),
-                json.get(KEY_RNG_FACTOR).asDouble(), json.get(KEY_EPSILON).asDouble());
-
-        return new LSMVTreeLocalResource(registry, json, vectorDimensions, vectorFields, filterFields, atomic,
-                confidenceInterval, minQuantile, maxQuantile, alpha, bits, sampleCount, vectorAccessorFactory,
-                identityFields, numIncludeFields, dataTupleBuilderFactory, distanceFunctionFactory, crossPollination);
-    }
-
-    /** Read an optional float field from JSON; returns {@code null} if the field is missing or null. */
-    private static Float readOptionalFloat(JsonNode json, String fieldName) {
-        if (!json.has(fieldName)) {
-            return null;
+        int[] identityFields = OBJECT_MAPPER.convertValue(require(json, KEY_IDENTITY_FIELDS), int[].class);
+        int numIncludeFields = require(json, KEY_NUM_INCLUDE_FIELDS).asInt();
+        int[] vectorFields = OBJECT_MAPPER.convertValue(require(json, KEY_VECTOR_FIELDS), int[].class);
+        boolean atomic = json.has(KEY_ATOMIC) && json.get(KEY_ATOMIC).asBoolean();
+        IVTreeBinaryAccessorFactory vectorAccessorFactory =
+                (IVTreeBinaryAccessorFactory) registry.deserialize(require(json, KEY_VECTOR_ACCESSOR_FACTORY));
+        IVTreeDistanceFunctionFactory distanceFunctionFactory =
+                (IVTreeDistanceFunctionFactory) registry.deserialize(require(json, KEY_DISTANCE_FUNCTION_FACTORY));
+        double epsilon = require(json, KEY_EPSILON).asDouble();
+        CrossPollinationConfig crossPollination = new CrossPollinationConfig(
+                require(json, KEY_CROSS_POLLINATION_M).asInt(), require(json, KEY_RNG_FACTOR).asDouble());
+
+        VTreeQuantizationParams quantization = null;
+        if (json.has(KEY_QUANTIZATION)) {
+            JsonNode node = json.get(KEY_QUANTIZATION);
+            quantization = new VTreeQuantizationParams((float) require(node, KEY_MIN_QUANTILE).asDouble(),
+                    (float) require(node, KEY_MAX_QUANTILE).asDouble(), (float) require(node, KEY_ALPHA).asDouble(),
+                    (float) require(node, KEY_CONFIDENCE_INTERVAL).asDouble(), require(node, KEY_BITS).asInt(),
+                    require(node, KEY_SAMPLE_COUNT).asInt());
         }
-        JsonNode node = json.get(fieldName);
-        return node.isNull() ? null : (float) node.asDouble();
+        return new LSMVTreeLocalResource(registry, json, vectorDimensions, vectorFields, atomic, vectorAccessorFactory,
+                identityFields, numIncludeFields, distanceFunctionFactory, crossPollination, epsilon, quantization);
     }
 
-    /** Read an optional int field from JSON; returns {@code null} if the field is missing or null. */
-    private static Integer readOptionalInt(JsonNode json, String fieldName) {
-        if (!json.has(fieldName)) {
-            return null;
-        }
-        JsonNode node = json.get(fieldName);
-        return node.isNull() ? null : node.asInt();
-    }
-
-    private static void putIfNotNull(ObjectNode json, String fieldName, Float value) {
-        if (value != null) {
-            json.put(fieldName, value);
-        }
-    }
-
-    private static void putIfNotNull(ObjectNode json, String fieldName, Integer value) {
-        if (value != null) {
-            json.put(fieldName, value);
+    /**
+     * Read a key {@link #appendToJson} always writes. Its absence means the file was written by another
+     * class or truncated, and substituting a default would silently mis-key the index.
+     *
+     * @throws HyracksDataException if the key is missing or null.
+     */
+    private static JsonNode require(JsonNode json, String key) throws HyracksDataException {
+        JsonNode node = json.get(key);
+        if (node == null || node.isNull()) {
+            throw HyracksDataException.create(ErrorCode.ILLEGAL_STATE,
+                    "LSMVTreeLocalResource is missing `" + key + "`; resource is corrupt");
         }
+        return node;
     }
 
-    public Float getConfidenceInterval() {
-        return confidenceInterval;
-    }
-
-    public Float getMinQuantile() {
-        return minQuantile;
-    }
-
-    public Float getMaxQuantile() {
-        return maxQuantile;
-    }
-
-    public Float getAlpha() {
-        return alpha;
-    }
-
-    public Integer getBits() {
-        return bits;
-    }
-
-    public Integer getSampleCount() {
-        return sampleCount;
-    }
-
-    public int getVectorDimensions() {
-        return vectorDimensions;
-    }
-
-    public int[] getVectorFields() {
-        return vectorFields;
-    }
-
-    public int[] getFilterFields() {
-        return filterFields;
-    }
-
-    public boolean isAtomic() {
-        return atomic;
-    }
-
-    /** @return true iff all required quantization parameters are present. */
-    public boolean hasQuantizationParams() {
-        return bits != null && confidenceInterval != null && minQuantile != null && maxQuantile != null
-                && alpha != null;
+    /** @return the scalar-quantization calibration, or {@code null} for a non-quantized index. */
+    public VTreeQuantizationParams getQuantizationParams() {
+        return quantization;
     }
 
     @Override
@@ -412,11 +276,6 @@ public class LSMVTreeLocalResource extends LsmResource implements IQuantizedReso
         if (parameters == null) {
             return;
         }
-        this.minQuantile = parameters.minQuantile();
-        this.maxQuantile = parameters.maxQuantile();
-        this.alpha = parameters.alpha();
-        this.bits = parameters.bits();
-        this.confidenceInterval = parameters.confidenceInterval();
-        this.sampleCount = parameters.sampleCount();
+        this.quantization = parameters;
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResourceFactory.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResourceFactory.java
index 3d677693ad..7e567384c4 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResourceFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/dataflow/LSMVTreeLocalResourceFactory.java
@@ -34,7 +34,6 @@ import org.apache.hyracks.storage.am.lsm.common.api.ILSMPageWriteCallbackFactory
 import org.apache.hyracks.storage.am.lsm.common.api.IVirtualBufferCacheProvider;
 import org.apache.hyracks.storage.am.lsm.common.dataflow.LsmResourceFactory;
 import org.apache.hyracks.storage.am.vector.api.IVTreeBinaryAccessorFactory;
-import org.apache.hyracks.storage.am.vector.api.IVTreeDataTupleBuilderFactory;
 import org.apache.hyracks.storage.am.vector.api.IVTreeDistanceFunctionFactory;
 import org.apache.hyracks.storage.am.vector.utils.CrossPollinationConfig;
 import org.apache.hyracks.storage.common.IResource;
@@ -50,13 +49,14 @@ public class LSMVTreeLocalResourceFactory extends LsmResourceFactory {
     protected final IVTreeBinaryAccessorFactory vectorAccessorFactory;
     protected final int[] identityFields;
     protected final int numIncludeFields;
-    protected final IVTreeDataTupleBuilderFactory dataTupleBuilderFactory;
 
     /** Distance-function factory supplied at DDL time; threaded onto {@link LSMVTreeLocalResource} for persistence. */
     protected final IVTreeDistanceFunctionFactory distanceFunctionFactory;
 
     /** Cross-pollination placement config supplied at DDL time; threaded onto {@link LSMVTreeLocalResource}. */
     protected final CrossPollinationConfig crossPollination;
+    /** Level-wise candidate window supplied at DDL time; threaded onto {@link LSMVTreeLocalResource}. */
+    protected final double epsilon;
 
     public LSMVTreeLocalResourceFactory(IStorageManager storageManager, ITypeTraits[] typeTraits,
             IBinaryComparatorFactory[] cmpFactories, ITypeTraits[] filterTypeTraits,
@@ -68,8 +68,8 @@ public class LSMVTreeLocalResourceFactory extends LsmResourceFactory {
             Map<String, String> mergePolicyProperties, boolean durable, int vectorDimensions, int[] vectorFields,
             ITypeTraits nullTypeTraits, INullIntrospector nullIntrospector, boolean atomic,
             IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] identityFields, int numIncludeFields,
-            IVTreeDataTupleBuilderFactory dataTupleBuilderFactory,
-            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination) {
+            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination,
+            double epsilon) {
         super(storageManager, typeTraits, cmpFactories, filterTypeTraits, filterCmpFactories, filterFields,
                 opTrackerFactory, ioOpCallbackFactory, pageWriteCallbackFactory, metadataPageManagerFactory,
                 vbcProvider, ioSchedulerProvider, mergePolicyFactory, mergePolicyProperties, durable, nullTypeTraits,
@@ -79,10 +79,10 @@ public class LSMVTreeLocalResourceFactory extends LsmResourceFactory {
         this.atomic = atomic;
         this.distanceFunctionFactory = distanceFunctionFactory;
         this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
+        this.epsilon = epsilon;
         this.vectorAccessorFactory = vectorAccessorFactory;
         this.identityFields = identityFields;
         this.numIncludeFields = numIncludeFields;
-        this.dataTupleBuilderFactory = dataTupleBuilderFactory;
     }
 
     @Override
@@ -92,6 +92,6 @@ public class LSMVTreeLocalResourceFactory extends LsmResourceFactory {
                 pageWriteCallbackFactory, metadataPageManagerFactory, vbcProvider, ioSchedulerProvider,
                 mergePolicyFactory, mergePolicyProperties, durable, vectorDimensions, vectorFields, nullTypeTraits,
                 nullIntrospector, atomic, vectorAccessorFactory, identityFields, numIncludeFields,
-                dataTupleBuilderFactory, distanceFunctionFactory, null, null, null, null, null, null, crossPollination);
+                distanceFunctionFactory, crossPollination, epsilon);
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/LSMVTree.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/LSMVTree.java
index d47888b9a8..471c42269c 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/LSMVTree.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/LSMVTree.java
@@ -126,6 +126,7 @@ public class LSMVTree extends AbstractLSMIndex implements ITreeIndex {
     protected final VTreeQuantizationParams quantizationParams;
     protected final IVTreeDistanceFunctionFactory distanceFunctionFactory;
     protected final CrossPollinationConfig crossPollination;
+    protected final double epsilon;
 
     // volatile: written under synchronized setStaticStructure/activation but read unsynchronized on the
     // search/flush path; the volatile publishes the reference safely to those readers.
@@ -145,7 +146,7 @@ public class LSMVTree extends AbstractLSMIndex implements ITreeIndex {
             IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] comparatorFields,
             IBinaryComparatorFactory[] keyCmpFactories, IVTreeDataTupleBuilderFactory dataTupleBuilderFactory,
             VTreeQuantizationParams quantizationParams, IVTreeDistanceFunctionFactory distanceFunctionFactory,
-            CrossPollinationConfig crossPollination) throws HyracksDataException {
+            CrossPollinationConfig crossPollination, double epsilon) throws HyracksDataException {
 
         super(storageConfig, ioManager, virtualBufferCaches, diskBufferCache, fileManager, bloomFilterFalsePositiveRate,
                 mergePolicy, opTracker, ioScheduler, ioOpCallbackFactory, pageWriteCallbackFactory, componentFactory,
@@ -165,6 +166,7 @@ public class LSMVTree extends AbstractLSMIndex implements ITreeIndex {
         this.quantizationParams = quantizationParams;
         this.distanceFunctionFactory = distanceFunctionFactory;
         this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
+        this.epsilon = epsilon;
 
         int i = 0;
         for (IVirtualBufferCache virtualBufferCache : virtualBufferCaches) {
@@ -174,7 +176,7 @@ public class LSMVTree extends AbstractLSMIndex implements ITreeIndex {
             VTree vTree = new VTree(virtualBufferCache, new VirtualFreePageManager(virtualBufferCache),
                     interiorFrameFactory, leafFrameFactory, metadataFrameFactory, insertDataFrameFactory, cmpFactories,
                     1, vectorDimensions, virtualFileRef, vectorAccessorFactory, dataTupleBuilderFactory,
-                    quantizationParams, this.distanceFunctionFactory, this.crossPollination);
+                    quantizationParams, this.distanceFunctionFactory, this.crossPollination, this.epsilon);
             LSMVTreeMemoryComponent mutableComponent = new LSMVTreeMemoryComponent(this, vTree, virtualBufferCache,
                     filterHelper == null ? null : filterHelper.createFilter());
             memoryComponents.add(mutableComponent);
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/VTreeFactory.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/VTreeFactory.java
index 0fba8f4125..c5726dafd7 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/VTreeFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/impls/VTreeFactory.java
@@ -47,6 +47,7 @@ public class VTreeFactory extends TreeIndexFactory<VTree> {
     private final VTreeQuantizationParams quantizationParams;
     private final IVTreeDistanceFunctionFactory distanceFunctionFactory;
     private final CrossPollinationConfig crossPollination;
+    private final double epsilon;
 
     public VTreeFactory(IIOManager ioManager, IBufferCache bufferCache, IPageManagerFactory freePageManagerFactory,
             ITreeIndexFrameFactory interiorFrameFactory, ITreeIndexFrameFactory leafFrameFactory,
@@ -54,7 +55,7 @@ public class VTreeFactory extends TreeIndexFactory<VTree> {
             IBinaryComparatorFactory[] cmpFactories, int fieldCount, int vectorDimensions,
             IVTreeBinaryAccessorFactory vectorAccessorFactory, IVTreeDataTupleBuilderFactory dataTupleBuilderFactory,
             VTreeQuantizationParams quantizationParams, IVTreeDistanceFunctionFactory distanceFunctionFactory,
-            CrossPollinationConfig crossPollination) {
+            CrossPollinationConfig crossPollination, double epsilon) {
         super(ioManager, bufferCache, freePageManagerFactory, interiorFrameFactory, leafFrameFactory, cmpFactories,
                 fieldCount);
         this.metadataFrameFactory = metadataFrameFactory;
@@ -65,13 +66,14 @@ public class VTreeFactory extends TreeIndexFactory<VTree> {
         this.quantizationParams = quantizationParams;
         this.distanceFunctionFactory = distanceFunctionFactory;
         this.crossPollination = crossPollination;
+        this.epsilon = epsilon;
     }
 
     @Override
     public VTree createIndexInstance(FileReference file) throws HyracksDataException {
         return new VTree(bufferCache, freePageManagerFactory.createPageManager(bufferCache), interiorFrameFactory,
-                leafFrameFactory, metadataFrameFactory, dataFrameFactory, cmpFactories, vectorDimensions,
-                vectorDimensions, file, vectorAccessorFactory, dataTupleBuilderFactory, quantizationParams,
-                distanceFunctionFactory, crossPollination);
+                leafFrameFactory, metadataFrameFactory, dataFrameFactory, cmpFactories, fieldCount, vectorDimensions,
+                file, vectorAccessorFactory, dataTupleBuilderFactory, quantizationParams, distanceFunctionFactory,
+                crossPollination, epsilon);
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/utils/LSMVTreeUtils.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/utils/LSMVTreeUtils.java
index bb25ebff65..6c24d6b06d 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/utils/LSMVTreeUtils.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-vtree/src/main/java/org/apache/hyracks/storage/am/lsm/vector/utils/LSMVTreeUtils.java
@@ -93,6 +93,7 @@ public final class LSMVTreeUtils {
      *                           has to be the one bulk-load placed the records by, and a default here
      *                           would be a second source of truth for it. Callers that do not care
      *                           about replication pass an explicit single-closest config.
+     * @param epsilon            level-wise candidate window from the index DDL, for the same reason.
      */
     public static LSMVTree createLSMTree(NCConfig storageConfig, IIOManager ioManager,
             List<IVirtualBufferCache> virtualBufferCaches, FileReference file, IBufferCache diskBufferCache,
@@ -105,8 +106,8 @@ public final class LSMVTreeUtils {
             IMetadataPageManagerFactory metadataPageManagerFactory, boolean atomic, RecordDescriptor inputRecDesc,
             IVTreeBinaryAccessorFactory vectorAccessorFactory, int[] identityFields,
             IVTreeDataTupleBuilderFactory dataTupleBuilderFactory, VTreeQuantizationParams quantizationParams,
-            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination)
-            throws HyracksDataException {
+            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination,
+            double epsilon) throws HyracksDataException {
 
         // VTree tuples contain no field that is both fixed-length AND nullable, so the null bitmap is never
         // load-bearing and no INullIntrospector is needed (unlike BTree/RTree secondary keys):
@@ -173,7 +174,7 @@ public final class LSMVTreeUtils {
         VTreeFactory vtreeFactory = new VTreeFactory(ioManager, diskBufferCache, metadataPageManagerFactory,
                 interiorFrameFactory, leafFrameFactory, metadataFrameFactory, insertDataFrameFactory, cmpFactories,
                 TREE_INDEX_FIELD_COUNT, vectorDimensions, vectorAccessorFactory, dataTupleBuilderFactory,
-                quantizationParams, distanceFunctionFactory, crossPollination);
+                quantizationParams, distanceFunctionFactory, crossPollination, epsilon);
         ILSMIndexFileManager fileManager = new LSMVTreeFileManager(ioManager, file, vtreeFactory);
         ILSMDiskComponentFactory componentFactory = new LSMVTreeDiskComponentFactory(vtreeFactory, filterHelper);
 
@@ -183,7 +184,7 @@ public final class LSMVTreeUtils {
                 bloomFilterFalsePositiveRate, cmpFactories, mergePolicy, opTracker, ioScheduler, ioOpCallbackFactory,
                 pageWriteCallbackFactory, vectorDimensions, vectorFields, filterFields, durable, atomic,
                 vectorAccessorFactory, comparatorFields, keyCmpFactories, dataTupleBuilderFactory, quantizationParams,
-                distanceFunctionFactory, crossPollination);
+                distanceFunctionFactory, crossPollination, epsilon);
     }
 
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTree.java b/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTree.java
index f471c04deb..3c3e06848e 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTree.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTree.java
@@ -95,6 +95,9 @@ public class VTree extends AbstractTreeIndex {
     // Cross-pollination placement parameters (M=1 = legacy single-closest). Threaded from the index
     // WITH clause so incremental insert/delete replicate into the same leaf clusters as bulk-load.
     private final CrossPollinationConfig crossPollination;
+    // Level-wise candidate window used to gather centroids before RNG thinning. Bulk-load, insert and
+    // delete must descend with the same value or they resolve different leaf clusters for one record.
+    private final double epsilon;
     /**
      * Directory- and data-page mutation, which needs nothing from this class but its buffer cache, file
      * id, page manager and directory frame factory. See {@link VTreePageMutator}.
@@ -128,8 +131,8 @@ public class VTree extends AbstractTreeIndex {
             ITreeIndexFrameFactory dataFrameFactory, IBinaryComparatorFactory[] cmpFactories, int fieldCount,
             int vectorDimensions, FileReference file, IVTreeBinaryAccessorFactory vectorAccessorFactory,
             IVTreeDataTupleBuilderFactory dataTupleBuilderFactory, VTreeQuantizationParams quantizationParams,
-            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination)
-            throws HyracksDataException {
+            IVTreeDistanceFunctionFactory distanceFunctionFactory, CrossPollinationConfig crossPollination,
+            double epsilon) throws HyracksDataException {
         super(bufferCache, freePageManager, interiorFrameFactory, leafFrameFactory, cmpFactories, fieldCount, file);
         this.vectorDimensions = vectorDimensions;
         this.metadataFrameFactory = metadataFrameFactory;
@@ -140,6 +143,11 @@ public class VTree extends AbstractTreeIndex {
         this.distanceFunctionFactory = distanceFunctionFactory;
         this.distanceFunction = distanceFunctionFactory.createDistanceFunction();
         this.crossPollination = Objects.requireNonNull(crossPollination, "crossPollination");
+        // A negative window would shrink rather than widen the candidate set, which no caller means.
+        if (epsilon < 0.0) {
+            throw new IllegalArgumentException("epsilon must be >= 0, got " + epsilon);
+        }
+        this.epsilon = epsilon;
         this.pageMutator = new VTreePageMutator(bufferCache, freePageManager, metadataFrameFactory);
     }
 
@@ -548,7 +556,7 @@ public class VTree extends AbstractTreeIndex {
         // results (~66% of bulk-loaded deletes at some k-means seeds). One routing function across bulk-load,
         // insert and delete guarantees matter and antimatter always agree on cluster and distance-to-centroid.
         List<ClusterSearchResult> candidates =
-                findCloseCentroidsLevelWiseGlobalSortFromRoot(vector, distanceFunction, crossPollination.epsilon());
+                findCloseCentroidsLevelWiseGlobalSortFromRoot(vector, distanceFunction, epsilon);
         List<ClusterSearchResult> accepted = RngAcceptanceFilter.accept(candidates, distanceFunction,
                 crossPollination.rngFactor(), crossPollination.m(), null);
         if (accepted.isEmpty()) {
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/utils/CrossPollinationConfig.java b/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/utils/CrossPollinationConfig.java
index e457498e35..b7091636b1 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/utils/CrossPollinationConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/utils/CrossPollinationConfig.java
@@ -21,63 +21,32 @@ package org.apache.hyracks.storage.am.vector.utils;
 import java.io.Serializable;
 
 /**
- * Immutable cross-pollination parameters threaded from the index DDL (WITH clause) down to the
- * storage-layer {@code VTree}, so that incremental insert/delete reproduce the exact multi-cluster
- * placement that bulk-load performs.
+ * Immutable cross-pollination parameters threaded from the index DDL down to the storage-layer
+ * {@code VTree}, so that incremental insert and delete reproduce the multi-cluster placement bulk-load
+ * performs. A record is written into the {@code m} closest leaf centroids that survive the SPTAG-style
+ * RNG diversity rule (see {@link RngAcceptanceFilter}). A delete cancels every replica only when it
+ * resolves the same centroid set, so both paths must hold the same config.
  * <p>
- * At bulk-load a record is written into the {@code m} closest leaf centroids, after eps-filtering
- * ({@code epsilon}) the candidate list and thinning it by the SPTAG-style RNG diversity rule
- * ({@code rngFactor}; see {@link RngAcceptanceFilter}). For incremental delete to cancel <em>every</em>
- * replica, the DML path must resolve the same centroid set — which means it must use the same three
- * parameters.
- * <p>
- * {@code m == 1} is plain single-closest placement, but it does <em>not</em> bypass the level-wise
- * search: {@code VTree#findReplicaClusters} runs the same
- * {@code findCloseCentroidsLevelWiseGlobalSort} + {@link RngAcceptanceFilter} pass for every {@code m},
- * and at {@code m == 1} simply takes the closest of the candidates that pass. {@code epsilon} prunes
- * that descent at every interior level, so a wider window can surface a strictly closer centroid and
- * change which single cluster wins. <em>{@code epsilon} is therefore load-bearing at every {@code m},
- * and must be identical on the bulk-load and DML paths.</em>
- * <p>
- * There is deliberately <em>no</em> default instance and no default for any component. Every holder
- * requires a non-null config and every persisted resource carries all three values explicitly, so the
- * only source is the index's own DDL. A fallback default here would be a second source of truth for
- * a value that must agree across bulk-load, insert and delete: the two silently diverging is what
- * previously let a delete resolve a different leaf cluster than the matter it had to cancel, leaving
- * the deleted record visible to vector search. Do not reintroduce one — pass the config through.
+ * There is deliberately no default instance and no default for either component: every holder requires
+ * a non-null config and every persisted resource carries both values, so the index's own DDL is the only
+ * source. A fallback here would be a second source of truth, and the two silently diverging is what once
+ * let a delete resolve a different leaf cluster than the matter it had to cancel.
  *
- * @param m         replica count; must be >= 1, and a smaller value is rejected rather than clamped.
- *                  1 disables cross-pollination.
+ * @param m         replica count; 1 disables cross-pollination.
  * @param rngFactor RNG diversity multiplier (canonical SPTAG = 1.0; non-finite disables the rule).
  *                  Inert at {@code m == 1}, where the diversity test never runs.
- * @param epsilon   level-wise candidate window used to gather centroids before RNG thinning. Applies
- *                  at every {@code m}, including 1.
  */
-public record CrossPollinationConfig(int m, double rngFactor, double epsilon) implements Serializable {
+public record CrossPollinationConfig(int m, double rngFactor) implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
     public CrossPollinationConfig {
-        // m is the replica count. DDL validates it to [1, MAX_CROSS_POLLINATION_M] and it defaults to 1,
-        // so a value below 1 is a wiring bug or a corrupt resource, not something to correct. Clamping it
-        // silently would produce a placement that disagrees with whatever the other path resolved, which
-        // is the same class of failure as substituting a default for epsilon.
+        // The DDL validates m to [1, MAX_CROSS_POLLINATION_M], so a smaller value is a wiring bug or a
+        // corrupt resource. Clamping it would produce a placement disagreeing with the other path's.
         if (m < 1) {
             throw new IllegalArgumentException("m must be >= 1, got " + m);
         }
-        // epsilon is a multiplicative window width; a negative value is meaningless (it would
-        // shrink rather than widen the candidate window). Reject it up front.
-        if (epsilon < 0.0) {
-            throw new IllegalArgumentException("epsilon must be >= 0, got " + epsilon);
-        }
-        // rngFactor is intentionally NOT validated: a non-finite value (NaN / +Infinity) is a
-        // legal input that disables the RNG diversity rule in RngAcceptanceFilter (degrading to a
-        // pure top-cap slice). Its semantics are the caller's contract.
-    }
-
-
-    /** @return true when records are replicated into more than one cluster. */
-    public boolean enabled() {
-        return m > 1;
+        // rngFactor is intentionally NOT validated: a non-finite value is a legal input that disables the
+        // RNG diversity rule in RngAcceptanceFilter, degrading it to a pure top-cap slice.
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/pom.xml b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/pom.xml
index a5aee396d4..f94e5ed92d 100644
--- a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/pom.xml
@@ -133,5 +133,15 @@
       <artifactId>log4j-api</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/LSMVTreeLocalResourceJsonTest.java b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/LSMVTreeLocalResourceJsonTest.java
new file mode 100644
index 0000000000..8a485aa383
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/LSMVTreeLocalResourceJsonTest.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.storage.am.lsm.vector;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
+import org.apache.hyracks.api.dataflow.value.ITypeTraits;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.io.IJsonSerializable;
+import org.apache.hyracks.api.io.IPersistedResourceRegistry;
+import org.apache.hyracks.storage.am.common.freepage.AppendOnlyLinkedMetadataPageManagerFactory;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationSchedulerProvider;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
+import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTrackerFactory;
+import org.apache.hyracks.storage.am.lsm.common.impls.NoOpIOOperationCallbackFactory;
+import org.apache.hyracks.storage.am.lsm.common.impls.NoOpPageWriteCallbackFactory;
+import org.apache.hyracks.storage.am.lsm.vector.dataflow.LSMVTreeLocalResource;
+import org.apache.hyracks.storage.am.vector.TestDoubleArrayVectorAccessor;
+import org.apache.hyracks.storage.am.vector.TestVTreeDistanceFunctionFactory;
+import org.apache.hyracks.storage.am.vector.api.VTreeQuantizationParams;
+import org.apache.hyracks.storage.am.vector.utils.CrossPollinationConfig;
+import org.apache.hyracks.storage.common.IStorageManager;
+import org.apache.hyracks.util.annotations.AiProvenance;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * Round-trips {@link LSMVTreeLocalResource} through {@code toJson}/{@code fromJson}. A local resource is
+ * the only description of an index that survives a restart, so a field that fails to round-trip surfaces
+ * as a silently mis-configured index rather than as an error here.
+ */
+@AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_5, tool = AiProvenance.Tool.CLAUDE_CODE_CLI, contributionKind = AiProvenance.ContributionKind.TEST_GENERATED, notes = "Round-trip tests for the local resource JSON")
+public class LSMVTreeLocalResourceJsonTest {
+
+    private static final ObjectMapper MAPPER = new ObjectMapper();
+
+    private static final int[] VECTOR_FIELDS = new int[] { 0 };
+    private static final int[] FILTER_FIELDS = new int[] { 3 };
+    private static final int[] IDENTITY_FIELDS = new int[] { 2 };
+    private static final int VECTOR_DIMENSIONS = 4;
+    private static final int NUM_INCLUDE_FIELDS = 2;
+    private static final double EPSILON = 0.75;
+    private static final CrossPollinationConfig CROSS_POLLINATION = new CrossPollinationConfig(3, 1.0);
+
+    /** Every key {@code appendToJson} writes unconditionally, so every key {@code fromJson} may not default. */
+    private static final String[] REQUIRED_KEYS =
+            { "vectorDimensions", "vectorFields", "identityFields", "numIncludeFields", "epsilon", "crossPollinationM",
+                    "rngFactor", "vectorAccessorFactory", "distanceFunctionFactory" };
+
+    @Test
+    public void quantizedResourceRoundTrips() throws Exception {
+        FakeRegistry registry = new FakeRegistry();
+        LSMVTreeLocalResource original = resource(registry);
+        VTreeQuantizationParams params = new VTreeQuantizationParams(0.1f, 0.9f, 0.8f, 0.999f, 8, 20000);
+        original.setQuantizationParameters(params);
+
+        JsonNode json = original.toJson(registry);
+        LSMVTreeLocalResource restored = (LSMVTreeLocalResource) LSMVTreeLocalResource.fromJson(registry, json);
+
+        assertEquals(text(json), text(restored.toJson(registry)));
+        assertNotNull(restored.getQuantizationParams());
+        assertEquals(params, restored.getQuantizationParams());
+    }
+
+    /** A truncated or foreign resource must be rejected, not silently defaulted into a mis-keyed index. */
+    @Test
+    public void missingRequiredKeyIsRejected() throws Exception {
+        FakeRegistry registry = new FakeRegistry();
+        JsonNode json = resource(registry).toJson(registry);
+        for (String key : REQUIRED_KEYS) {
+            ObjectNode truncated = json.deepCopy();
+            truncated.remove(key);
+            try {
+                LSMVTreeLocalResource.fromJson(registry, truncated);
+                fail("fromJson accepted a resource with no `" + key + "`");
+            } catch (HyracksDataException e) {
+                assertEquals("expected the message to name the missing key `" + key + "`", true,
+                        e.getMessage().contains(key));
+            }
+        }
+    }
+
+    /** The base class owns filterFields; a subclass copy would write it twice and read back the later one. */
+    @Test
+    public void filterFieldsIsWrittenOnce() throws Exception {
+        FakeRegistry registry = new FakeRegistry();
+        String json = resource(registry).toJson(registry).toString();
+        assertEquals(1, countOccurrences(json, "\"filterFields\""));
+    }
+
+    /**
+     * @return the serialized form, since {@code putPOJO} wraps an {@code int[]} in a node that compares by
+     *         reference and so never equals its deserialized twin.
+     */
+    private static String text(JsonNode json) {
+        return json.toString();
+    }
+
+    private static int countOccurrences(String haystack, String needle) {
+        int count = 0;
+        for (int i = haystack.indexOf(needle); i >= 0; i = haystack.indexOf(needle, i + needle.length())) {
+            count++;
+        }
+        return count;
+    }
+
+    private static LSMVTreeLocalResource resource(FakeRegistry registry) {
+        return new LSMVTreeLocalResource("dataverse/dataset/0/idx", registry.serializable(IStorageManager.class),
+                new ITypeTraits[] { registry.serializable(ITypeTraits.class) },
+                new IBinaryComparatorFactory[] { registry.serializable(IBinaryComparatorFactory.class) }, null, null,
+                FILTER_FIELDS, registry.serializable(ILSMOperationTrackerFactory.class),
+                NoOpIOOperationCallbackFactory.INSTANCE, NoOpPageWriteCallbackFactory.INSTANCE,
+                AppendOnlyLinkedMetadataPageManagerFactory.INSTANCE, null,
+                registry.serializable(ILSMIOOperationSchedulerProvider.class),
+                registry.serializable(ILSMMergePolicyFactory.class), Collections.emptyMap(), true, VECTOR_DIMENSIONS,
+                VECTOR_FIELDS, null, null, true, TestDoubleArrayVectorAccessor.Factory.INSTANCE, IDENTITY_FIELDS,
+                NUM_INCLUDE_FIELDS, TestVTreeDistanceFunctionFactory.INSTANCE, CROSS_POLLINATION, EPSILON);
+    }
+
+    /**
+     * Serializes a collaborator to a token and hands the same instance back for it, so the test exercises
+     * the resource's own JSON rather than the registry's class table. Collaborators that write themselves
+     * (the {@code NoOp*} singletons) are recognized by the class name they put in their identifier node.
+     */
+    private static final class FakeRegistry implements IPersistedResourceRegistry {
+
+        private static final String TOKEN_FIELD = "@token";
+
+        private final Map<Integer, IJsonSerializable> byToken = new HashMap<>();
+        private final Map<String, IJsonSerializable> byClass = new HashMap<>();
+        private final AtomicInteger nextToken = new AtomicInteger();
+
+        /** @return a stub of {@code clazz} that serializes to a token this registry resolves back to it. */
+        <T extends IJsonSerializable> T serializable(Class<T> clazz) {
+            T instance = mock(clazz);
+            int token = nextToken.incrementAndGet();
+            byToken.put(token, instance);
+            ObjectNode node = MAPPER.createObjectNode();
+            node.put(TOKEN_FIELD, token);
+            try {
+                when(instance.toJson(any())).thenReturn(node);
+            } catch (HyracksDataException e) {
+                throw new AssertionError(e);
+            }
+            return instance;
+        }
+
+        @Override
+        public ObjectNode getClassIdentifier(Class<? extends IJsonSerializable> clazz, long version) {
+            ObjectNode node = MAPPER.createObjectNode();
+            node.put(TYPE_FIELD_ID, clazz.getSimpleName());
+            node.put(VERSION_FIELD_ID, version);
+            node.put(CLASS_FIELD_ID, clazz.getName());
+            return node;
+        }
+
+        @Override
+        public IJsonSerializable deserialize(JsonNode json) throws HyracksDataException {
+            if (json.has(TOKEN_FIELD)) {
+                return byToken.get(json.get(TOKEN_FIELD).asInt());
+            }
+            String className = json.get(CLASS_FIELD_ID).asText();
+            IJsonSerializable known = byClass.get(className);
+            if (known != null) {
+                return known;
+            }
+            throw HyracksDataException.create(new IllegalStateException("unregistered class " + className));
+        }
+
+        @Override
+        public IJsonSerializable deserializeOrDefault(JsonNode json, Class<? extends IJsonSerializable> clazz)
+                throws HyracksDataException {
+            return json == null ? null : deserialize(json);
+        }
+
+        FakeRegistry() {
+            byClass.put(NoOpIOOperationCallbackFactory.class.getName(), NoOpIOOperationCallbackFactory.INSTANCE);
+            byClass.put(NoOpPageWriteCallbackFactory.class.getName(), NoOpPageWriteCallbackFactory.INSTANCE);
+            byClass.put(AppendOnlyLinkedMetadataPageManagerFactory.class.getName(),
+                    AppendOnlyLinkedMetadataPageManagerFactory.INSTANCE);
+            byClass.put(TestDoubleArrayVectorAccessor.Factory.class.getName(),
+                    TestDoubleArrayVectorAccessor.Factory.INSTANCE);
+            byClass.put(TestVTreeDistanceFunctionFactory.class.getName(), TestVTreeDistanceFunctionFactory.INSTANCE);
+        }
+    }
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/util/LSMVTreeTestContext.java b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/util/LSMVTreeTestContext.java
index 5278791e40..e4d2d07610 100644
--- a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/util/LSMVTreeTestContext.java
+++ b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-lsm-vtree-test/src/test/java/org/apache/hyracks/storage/am/lsm/vector/util/LSMVTreeTestContext.java
@@ -66,11 +66,14 @@ import org.apache.hyracks.storage.common.buffercache.IBufferCache;
 public final class LSMVTreeTestContext extends AbstractVectorTreeTestContext {
 
     /**
-     * Placement for the fixtures: one cluster per record, canonical RNG factor, and one candidate window
-     * used by every path. Stated explicitly because {@code CrossPollinationConfig} intentionally has no
-     * default — the value must be the one records were placed by, so it is never implied.
+     * Placement for the fixtures: one cluster per record and the canonical RNG factor. Stated explicitly
+     * because {@code CrossPollinationConfig} intentionally has no default — the value must be the one
+     * records were placed by, so it is never implied.
      */
-    private static final CrossPollinationConfig SINGLE_CLOSEST = new CrossPollinationConfig(1, 1.0, 0.25);
+    private static final CrossPollinationConfig SINGLE_CLOSEST = new CrossPollinationConfig(1, 1.0);
+
+    /** The candidate window the fixtures descend with; explicit for the same reason. */
+    private static final double EPSILON = 0.25;
 
     /** The fixtures declare one identity field; its position follows the builder's quantization mode. */
     private static final int NUM_KEY_FIELDS = 1;
@@ -190,7 +193,7 @@ public final class LSMVTreeTestContext extends AbstractVectorTreeTestContext {
                 VTreeDataTupleAccessor.identityFields(effectiveFactory.isQuantized(), NUM_KEY_FIELDS), effectiveFactory,
                 (VTreeQuantizationParams) null, // builderFactory, quantizer
                 TestVTreeDistanceFunctionFactory.INSTANCE, // distanceFunctionFactory (test fixture)
-                SINGLE_CLOSEST); // crossPollination
+                SINGLE_CLOSEST, EPSILON);
 
         return new LSMVTreeTestContext(fieldSerdes, lsmVTree, numVectorFields);
     }
@@ -232,7 +235,7 @@ public final class LSMVTreeTestContext extends AbstractVectorTreeTestContext {
                 true, metadataPageManagerFactory, false, (RecordDescriptor) null,
                 TestDoubleArrayVectorAccessor.Factory.INSTANCE,
                 VTreeDataTupleAccessor.identityFields(effectiveFactory.isQuantized(), NUM_KEY_FIELDS), effectiveFactory,
-                quantizationParams, TestVTreeDistanceFunctionFactory.INSTANCE, SINGLE_CLOSEST);
+                quantizationParams, TestVTreeDistanceFunctionFactory.INSTANCE, SINGLE_CLOSEST, EPSILON);
 
         return new LSMVTreeTestContext(fieldSerdes, lsmVTree, numVectorFields);
     }