Commit Graph

208 Commits

Author SHA1 Message Date
lichen2015 bdf58fc2d2
fix: prevent SIGABRT when adding nullable column to multi-segment collection (#415) (#416)
When add_column is called on a multi-segment collection with a nullable
field and no expression, segment.cc previously sliced an Arrow ChunkedArray
with an offset that exceeded the array length, triggering SIGABRT in
Arrow's chunked_array.cc:170 assertion.

Fix the slicing logic in segment.cc to materialize null values per segment.
Add comprehensive tests in collection_test.cc and segment_test.cc covering
multi-segment add_column scenarios (nullable/non-nullable, with/without
expression, with/without unflushed data, drop+re-add).
2026-05-24 14:13:57 +08:00
Qinren Zhou d351637da8
fix: optimize allocated wrong names for vector index (#421) 2026-05-23 11:15:22 +08:00
egolearner 9aae7494ad
chore: enable modernize-use-override and fix existing violations (#419)
Add modernize-use-override to .clang-tidy and apply fixes across
src/ and tests/: replace redundant virtual with override, annotate
missing override on derived methods, and drop redundant virtual on
already-overridden methods.
2026-05-21 19:05:32 +08:00
ZeFeng Yin bae0e1b763
chore: fix nightly coverage run-error (#417) 2026-05-21 11:47:49 +08:00
egolearner 9bfc4b556a
chore: fix more warnings (#418) 2026-05-21 11:15:41 +08:00
egolearner 51c6d9e0ec
chore(thirdparty): mark third-party include paths as SYSTEM (#413)
Add SYSTEM to target_include_directories in vendored CMake wrappers and
set INTERFACE_SYSTEM_INCLUDE_DIRECTORIES on imported / sub-project
targets so warnings from third-party headers no longer surface in our
build output. Introduces a mark_target_includes_system() helper in
cmake/utils.cmake (resolves aliases, skips missing targets) used by the
upstream-add_subdirectory wrappers (glog, gflags, googletest, yaml-cpp,
protobuf, antlr).
2026-05-19 15:03:07 +08:00
Jason d580c08187
fix: correct format specifiers for uint64_t types (#374)
Signed-off-by: syaojun <libevent@yeah.net>
Co-authored-by: rayx <rui.xing@alibaba-inc.com>
2026-05-19 13:45:32 +08:00
feihongxu0824 18b79586a7
ci: skip timing-sensitive GIL test in coverage builds (#412)
The COVERAGE build type uses -O0 and gcov instrumentation, which slows
C++ query execution ~5-10x. This causes test_gil_released_during_query
to exceed its 0.5s timing threshold and fail with an inconclusive result.
2026-05-19 10:45:42 +08:00
feihongxu0824 a9008b0fd2
fix: nullable scalar field filter leaks null documents without inverted index (#410)
When a nullable scalar field has no inverted index, the forward filter path
fails to handle null values from Arrow's filter evaluation:

1. get_forward_bit(): BooleanArray::operator[] returns nullopt for null entries,
   which is_filtered() treats as "no filter" (not filtered), letting null docs
   through. Fix: use value_or(false) to treat null as "not matched".

2. is_matched_by_forward_filter(): reads BooleanScalar.value without checking
   is_valid, which is UB for null scalars. Fix: check is_valid first.

Closes #409

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 20:25:06 +08:00
rayx 3e02031eb8
refactor: remove hamming metric (#365)
* refactor: remove binary metric

* fix: fix windows
2026-05-18 19:31:20 +08:00
feihongxu0824 273ffc2ad8
enhance: release gil lock in collection bindings (#363) 2026-05-14 10:15:49 +08:00
Qinren Zhou e8eaf0aa57
fix: python ut (#401) 2026-05-13 15:56:58 +08:00
Qinren Zhou e0b8331116
minor: revise error messages (#400) 2026-05-13 13:18:54 +08:00
egolearner a29b9b366c
chore: clang-tidy check fast quits if no cpp files changed (#396) 2026-05-13 10:03:26 +08:00
Cuiys 42958caef5
feat(test): enable parallel tests (#384)
- Set unique WORKING_DIRECTORY per test binary via cc_test()/cuda_test() to prevent filesystem path conflicts when running tests in parallel. Each test runs in ${CMAKE_BINARY_DIR}/test_tmp/${test_name}/.

- Enable parallel ctest execution in the unittest target with ProcessorCount-based --parallel flag (defaults to NPROC - 1).

- Set TEST_BINARY_DIR environment variable for crash recovery tests so they can locate helper binaries from isolated working directories.

- Update LocateDataGenerator() and LocateOptimizeGenerator() to search TEST_BINARY_DIR and TEST_BINARY_DIR/bin for helper executables.
2026-05-12 23:14:17 +08:00
egolearner d0489da401
ut: fix some uts (#394) 2026-05-12 19:04:33 +08:00
Cuiys d91867e00e
ci: add ccache/sccache compilation caching to speed up CI builds (#360)
* ci: add ccache/sccache compilation caching to speed up CI builds

- Use hendrikmuhs/ccache-action@v1.2 for Linux/macOS/iOS/Android/clang-tidy
  (auto-installs ccache, manages cache, sets env vars, shows stats)
- Use mozilla-actions/sccache-action@v0.0.9 for Windows (MSVC compatible)
- Add CMAKE_C/CXX_COMPILER_LAUNCHER to all CMake build steps
- Exclude wheel build and nightly coverage workflows per decision

* ci: switch MacOS & Linux build from Unix Makefiles to Ninja generator

- Replace CMAKE_GENERATOR='Unix Makefiles' with 'Ninja' in pip build
- Replace 'make unittest -j' with 'cmake --build --target unittest --parallel'
- Add '-G Ninja' to C++ and C example cmake configure steps
- Replace 'make -j' with 'cmake --build --parallel' for examples
- Aligns with Windows and Android workflows which already use Ninja

* ci: enable parallel ctest execution with -j and --timeout

- Use CMake ProcessorCount module to detect available CPU cores
- Add -j ${NPROC} to ctest command for parallel test execution
- Add --timeout 300 to prevent individual tests from hanging CI
- Fallback to NPROC=1 when ProcessorCount returns 0
- iOS target unchanged (build-only, no test execution)

* Revert "ci: enable parallel ctest execution with -j and --timeout"

This reverts commit d196dac5f17b1f7cae443360c88bbd8c935dc145.

* fix(ci): remove sccache from Windows, fix cmake.define quote issues

Windows (05-windows-build.yml):
- Remove mozilla-actions/sccache-action: sccache incompatible with MSVC /FS flag
- Remove SCCACHE_GHA_ENABLED env var
- Remove CMAKE_C/CXX_COMPILER_LAUNCHER=sccache from build steps
- Remove 'Show sccache statistics' step
- MSVC /FS (global PDB concurrency flag) causes fatal C1041 when used with sccache

MacOS & Linux (03-macos-linux-build.yml):
- Fix cmake.define values: remove extra quotes around 'ccache' and 'ON'
- Bare values required: cmake.define.FOO=bar not cmake.define.FOO="bar"

* feat: cache key with platform and os

* ci: add compiler to ccache key to avoid cache pollution

* ci: optimize cache usage to reduce bloat

- Add max-size limits to all ccache configs (150M general, 300M Android,
  100M clang-tidy) to prevent unbounded cache growth
- Remove redundant iOS full build directory cache (~1.2 GB) since ccache
  already handles incremental compilation
- Fix iOS protoc cache key to use thirdparty/protobuf/** instead of
  src/**, avoiding unnecessary cache misses on business code changes

* ci: trigger CI run
2026-05-12 15:48:48 +08:00
egolearner ce468af29b
deprecate python VectorQuery (#267)
* deprecate python VectorQuery

* remove import
2026-05-12 14:55:49 +08:00
luoxiaojian 269c611f78
build(thirdparty): replace CRoaring submodule with amalgamation (~292M -> ~1MB) (#381) 2026-05-12 14:55:08 +08:00
ZeFeng Yin ee40e5e0b7
fix hnsw context fetch (#386) 2026-05-11 11:17:40 +08:00
ZeFeng Yin 3b0921b0e1
minor: update readme for v0.4.0 (#389) 2026-05-09 11:40:30 +08:00
Qinren Zhou cfe9eed2f8
minor: remove unused validation in c api (#388) 2026-05-08 19:04:45 +08:00
Jalin Wang 1d4ae0b1b5
refactor: support UTF-8 file paths via std::filesystem (#359)
Rewrite file/path handling to use std::filesystem and UTF-8-safe helpers.
Switch Windows file open/create paths to wide-char APIs, replace manual
separator concatenation with PathJoin, and enable RocksDB UTF-8 filenames.

Also add UTF-8 path coverage for file IO, version manager recovery, and
collection open/flush/reopen flows.
2026-05-08 17:44:22 +08:00
Qinren Zhou 68a497efdb
fix: sparse vector indices should be ordered (#382) 2026-05-07 16:40:49 +08:00
ZeFeng Yin d02ae2b74e
fix: rollback hnsw ChunkSize to 2M (#383) 2026-05-07 11:00:00 +08:00
luoxiaojian efab064676
feat: refac entity and impl Vamana. (#371) 2026-04-30 10:22:25 +08:00
ZeFeng Yin 005680522b
feat: merge vector arrow buffer (#320) 2026-04-29 19:24:50 +08:00
ZeFeng Yin 07e986d3d5
fix: hnsw chunk size init (#372) 2026-04-29 10:50:16 +08:00
ZeFeng Yin 06e2845069
fix hnsw_streamer_test (#375) 2026-04-28 19:12:32 +08:00
feihongxu0824 8884b2de5b
minor: update wechat qrcode in cn readme 2026-04-24 10:51:04 +08:00
feihongxu0824 d55aa74c4c
minor: update readme wechat qrcode 2026-04-24 10:37:02 +08:00
Qinren Zhou 4e7fa0f37f
fix: some minor bugs (#370) 2026-04-23 16:24:59 +08:00
egolearner 2b16ed39cd
chore: rm hnsw-rabitq searcher/streamer (#367)
* chore: rm hnsw-rabitq searcher/streamer

* fix clang-tidy

* fix
2026-04-23 10:20:46 +08:00
feihongxu0824 d9cf689ce1
ci: disable benchmark ci temp (#362) 2026-04-21 14:39:25 +08:00
Qinren Zhou ad1411b7bc
minor: update readme (#361) 2026-04-21 12:33:20 +08:00
ZeFeng Yin 4a4c02c1a5
chore: rm hnsw builder/searcher (#356) 2026-04-21 10:44:06 +08:00
feihongxu0824 bbe4ca7bae
minor: fix c example cmake and build c++ dynamic lib (#347) 2026-04-20 22:08:34 +08:00
kgeg401 1e25294c07
feat(ci): integrate clang-tidy for changed C/C++ files (#116)
* feat(ci): add clang-tidy checks for changed cpp files

* fix(ci): correct clang-tidy workflow heredoc indentation

* test: stabilize fp16 euclidean matrix comparison

* test: fix fp16 matrix CI and clang-tidy warnings

* ci: scope clang-tidy PR and filter compile-db files

* check nullptr only

* fix nullptr

* fix: format

* chore: ignore c

* fix: tests files

* fix: workflow

* fix: specify clang-tidy version

* fix: filter regex

* fix: more files

* fix: update version

* add thirdparty cache

* add pipeline dependency

* fix clang-tidy trigger

---------

Co-authored-by: kgeg401 <kgeg401@users.noreply.github.com>
Co-authored-by: jiliang.ljl <jiliang.ljl@alibaba-inc.com>
2026-04-20 20:14:21 +08:00
Qinren Zhou c17bd8876e
fix: validate query_params type (#351) 2026-04-20 10:54:06 +08:00
Qinren Zhou f0c8476372
minor: update readme (#355) 2026-04-19 20:17:48 +08:00
Qinren Zhou 78d2ad9bce
minor: update readme (#354) 2026-04-19 15:36:11 +08:00
Qinren Zhou f602ed30ce
feat: enlarge topK limit (#348) 2026-04-17 17:51:07 +08:00
Jalin Wang 3f9ebbbe96
chore: Update ReadMe for v0.3.1 release (#349) 2026-04-17 15:42:55 +08:00
Jalin Wang 1492175906
fix: add GetLastErrorString() helper for accurate OS error messages (#341) 2026-04-16 15:30:47 +08:00
Jalin Wang 95d092e9b3
fix: relax collection path restriction (#340) 2026-04-16 15:26:15 +08:00
feihongxu0824 37cd226410
chore: update wechat (#344) 2026-04-16 14:17:46 +08:00
Qinren Zhou 4665b4cf81
minor: update readme (#342) 2026-04-16 13:46:02 +08:00
Zihao Wang d29bffca39
fix(quantizer): use rounded int8 values for SQ8 metadata to fix recall drop (#329)
fixes #328

Problem:
SQ8 metadata (squared_sum, sum) was computed from pre-rounded float
values, causing mismatch with actual stored int8 values. On asymmetric
datasets (e.g. OpenAI 1536D where |x_min| >> x_max), this leads to
severe recall drop.

Solution:
Move std::round before accumulating squared_sum and sum.

Co-authored-by: rayx <rui.xing@alibaba-inc.com>
2026-04-16 10:07:14 +08:00
feihongxu0824 6737810190
ci: refact android ci (#330) 2026-04-15 15:37:51 +08:00
Qinren Zhou 044a377eee
fix: crash recovery ut (#336) 2026-04-14 23:35:51 +08:00