>From Ali Alsuliman :
Ali Alsuliman has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21679?usp=email )
Change subject: [ASTERIXDB-3817][TEST] Add a standalone vtree test module
..
[ASTERIXDB-3817][TEST] Add a standalone vtree test module
The vector index had one test module, hyracks-storage-am-lsm-vtree-test,
which reaches the page-mutation and attachment code only through an LSM
component. Some paths are impractical to provoke that way, and they are
the ones most likely to be wrong: a directory page splitting while it is
not last in its chain, and the window after a memory component is
recycled. Both have carried a real defect.
hyracks-storage-am-vtree-test drives that code directly against a buffer
cache, with no LSM component, operation tracker, flush or merge. 13
tests in three classes:
VTreePageMutatorTest exercises the collaborator extracted from VTree:
first insert into an empty directory, tuples surviving data-page splits,
physical delete, and the non-last directory-page split. Assertions are
on reachability -- everything inserted must still be findable by walking
the directory chain the way the production code walks it -- so an
orphaned chain shows up as missing tuples rather than requiring the test
to know the page layout. Reintroducing the successor-dropping bug in
handleMetadataPageOverflow fails it with 726 tuples reachable out of
863, and fails nothing else.
VTreeStaticStructureAttachmentTest covers attach, recycle and re-attach.
Two trees on one buffer cache stand in for the two components, differing
in file id and root page so that "fell back to its own tree" is
distinguishable from "still borrowing", and the borrowed cache is a
distinct delegating stand-in over the same real cache so that it
discriminates too. Against the code before the attachment was made
atomic, the recycle test fails on each of those three -- file id, root
page and buffer cache -- and fails nothing else.
StaticStructureRefTest pins the centroid-to-directory lookup that used
to be four copies of the same arithmetic.
The module depends on hyracks-storage-am-lsm-vtree for
LSMVTreeDataTupleWriterFactory alone, so the data-page tuple layout
under test is the production one. The existing LSM test module is
unchanged: all 20 of its test classes drive LSMVTree or its harness, and
the tree keeps one test module per production module.
Ext-ref: MB-73194
Co-Authored-By: Claude Opus 5
Change-Id: I2d383bfed737719740671864d6ea5aac4097a7cf
---
A hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/pom.xml
A
hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/src/test/java/org/apache/hyracks/storage/am/vector/impls/StaticStructureRefTest.java
A
hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/src/test/java/org/apache/hyracks/storage/am/vector/impls/VTreePageMutatorTest.java
A
hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/src/test/java/org/apache/hyracks/storage/am/vector/impls/VTreeStaticStructureAttachmentTest.java
M hyracks-fullstack/hyracks/hyracks-tests/pom.xml
5 files changed, 777 insertions(+), 0 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/79/21679/1
diff --git
a/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/pom.xml
b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/pom.xml
new file mode 100644
index 000..dab6bd6
--- /dev/null
+++
b/hyracks-fullstack/hyracks/hyracks-tests/hyracks-storage-am-vtree-test/pom.xml
@@ -0,0 +1,111 @@
+
+http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+ 4.0.0
+ hyracks-storage-am-vtree-test
+ hyracks-storage-am-vtree-test
+
+
+org.apache.hyracks
+hyracks-tests
+0.3.10-SNAPSHOT
+
+
+
+${basedir}/../../..
+
+
+
+
+
+org.apache.maven.plugins
+maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ org.apache.hyracks
+ hyracks-storage-am-vtree
+ ${project.version}
+ test
+
+
+
+ org.apache.hyracks
+ hyracks-storage-am-lsm-vtree
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-test-support
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-storage-am-common
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-storage-common
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-dataflow-common
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-data-std
+ ${project.version}
+ test
+
+
+ org.apache.hyracks
+ hyracks-api
+