Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compatibility Check Tool (check_compatibility)

check_compatibility verifies whether the current VSAG build can load and search index files created by older VSAG versions. It is mainly used in CI to catch serialization and backward compatibility regressions.

Build

Using the project Makefile, enable tools with VSAG_ENABLE_TOOLS=ON; the underlying CMake options are ENABLE_TOOLS=ON and ENABLE_CXX11_ABI=ON:

VSAG_ENABLE_TOOLS=ON make release
# Output: ./build-release/tools/check_compatibility/check_compatibility

When invoking CMake directly, pass both options explicitly:

cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release \
  -DENABLE_TOOLS=ON -DENABLE_CXX11_ABI=ON
cmake --build build-release -j

Inputs

The command accepts one positional identifier in the form <tag>_<algo_name>, for example v1.0.0_hnsw. For that identifier, the tool expects these files under /tmp/:

FilePurpose
/tmp/<tag>_<algo_name>.indexSerialized index produced by the older VSAG version
/tmp/<tag>_<algo_name>_build.jsonBuild parameters used for that index
/tmp/<tag>_<algo_name>_search.jsonSearch parameters used for the sanity check
/tmp/random_512d_10K.binTest vectors used by the search verification

These files are usually generated by compatibility fixtures from previous releases.

Usage

./build-release/tools/check_compatibility/check_compatibility v1.0.0_hnsw

The tool creates a current-version index instance, deserializes the old index file, then runs a small KNN search. It prints <identifier> success when both load and search succeed; otherwise it prints <identifier> failed and exits with a non-zero status.

Local Entry Point

A short local pointer is kept at tools/check_compatibility/README.md for developers browsing the tool directory.