leaves12138 commented on code in PR #62:
URL:
https://github.com/apache/paimon-vector-index/pull/62#discussion_r3651866757
##########
cpp/test_vindex.cpp:
##########
@@ -208,52 +254,77 @@ static void test_supported_index_roundtrips() {
{"dimension", "8"},
{"nlist", "4"},
{"metric", "l2"},
- {"pq.m", "4"},
},
PAIMON_VINDEX_INDEX_TYPE_IVF_PQ,
- 4,
- 0);
+ 2,
+ 8);
run_roundtrip(
"ivf_rq_roundtrip",
{
{"index.type", "ivf_rq"},
{"dimension", "8"},
{"nlist", "4"},
+ {"rq.bits", "5"},
{"metric", "l2"},
},
PAIMON_VINDEX_INDEX_TYPE_IVF_RQ,
0,
0);
run_roundtrip(
- "ivf_hnsw_flat_roundtrip",
+ "ivf_sq_roundtrip",
{
- {"index.type", "ivf_hnsw_flat"},
+ {"index.type", "ivf_sq"},
{"dimension", "8"},
{"nlist", "4"},
{"metric", "l2"},
- {"hnsw.m", "4"},
},
- PAIMON_VINDEX_INDEX_TYPE_IVF_HNSW_FLAT,
+ PAIMON_VINDEX_INDEX_TYPE_IVF_SQ,
0,
- 4);
+ 8);
run_roundtrip(
- "ivf_hnsw_sq_roundtrip",
+ "diskann_roundtrip",
{
- {"index.type", "ivf_hnsw_sq"},
+ {"index.type", "diskann"},
{"dimension", "8"},
- {"nlist", "4"},
{"metric", "l2"},
- {"hnsw.m", "4"},
+ {"pq.m", "4"},
+ {"pq.bits", "4"},
+ {"diskann.max-degree", "8"},
+ {"diskann.build-search-list-size", "16"},
},
- PAIMON_VINDEX_INDEX_TYPE_IVF_HNSW_SQ,
- 0,
+ PAIMON_VINDEX_INDEX_TYPE_DISKANN,
+ 4,
4);
}
+static void test_worker_callback_reentry_is_rejected() {
+ int callback_context = 0;
+ paimon::vindex::detail::NativeHandleMutex mutex;
+ mutex.set_callback_context(&callback_context);
+ std::atomic<bool> rejected(false);
+
+ std::lock_guard<paimon::vindex::detail::NativeHandleMutex>
operation(mutex);
+ std::thread callback_worker([&]() {
Review Comment:
This new `std::thread` dependency is not linked by `cpp/CMakeLists.txt`. The
GitHub Ubuntu runner passes because newer glibc folds pthread symbols into
libc, but the same documented CMake build fails on GCC 12 / glibc 2.32 with
`undefined reference to pthread_create` and `DSO missing from command line`.
Could we add `find_package(Threads REQUIRED)` and link `Threads::Threads` to
`test_vindex_cpp`? I verified the rest of the current-head C++ code builds once
`-pthread` is supplied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]