oceanbase / oceanbase/seekdb

CREATE VECTOR INDEX with drop_ratio_search fails with error 1210 for sparse vectors using SINDI/VSAG

Open
#513 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dima type: bug
Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Environment

  • Version: Server version: 5.7.25 OceanBase seekdb (r) (Built 1-6006e21fa93bdfcf5496d13de61fe94aacaebaa4 Apr 6 2026)
  • Platform: arm64
  • Device: emulator-5554 (Android Studio Android Virtual Device)
  • Startup Command: ./data/local/tmp/seekdb --nodaemon --base-dir /data/local/tmp/seekdb_data --port 5881
  • Port: 5881

Description

When creating a vector index on a SPARSEVECTOR column using the SINDI type and VSAG library with the drop_ratio_search parameter specified, the operation fails with error 1210. The same operation succeeds when drop_ratio_search is not specified.

Steps to Reproduce

  1. On the machine, navigate to the directory /obdata/data/AndroidTest/ob_opensource_test/tools/deploy.
  2. Execute the following commands to set up the test environment and run the specific test case:
export OCEANBASE_HOME=/obdata/data/AndroidTest/ob_opensource_test/
cd ${OCEANBASE_HOME}/tools/deploy
source activate_obd.sh
export OBD_SEEKDB_STATUS_FALLBACK_TCP=1

obd test mysqltest test_env --mysqltest-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/mysqltest --obclient-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/obclient --init-only --init-sql-dir=${OCEANBASE_HOME}/tools/deploy --init-sql-files='init.sql,init_user.sql|root@sys|test'
obd test mysqltest test_env --mysqltest-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/mysqltest --obclient-bin=${OCEANBASE_HOME}/deps/3rd/u01/obclient/bin/obclient --disable-reboot --test-set=vector_index.sparse_vector_rebuild_refresh_index
  1. Alternatively, execute the following SQL to reproduce the issue directly:
USE test;

-- The following segment is consistent with the use case; if the cluster has not enabled vectorized memory, you can first execute:
-- ALTER SYSTEM SET ob_vector_memory_limit_percentage = 20;

DROP TABLE IF EXISTS t1;

CREATE TABLE t1 (c1 INT, c2 SPARSEVECTOR);
INSERT INTO t1 VALUES (1, '{1:0.1,2:0.2, 3:0.3}');
INSERT INTO t1 VALUES (2, '{3:0.3, 2:0.2, 4:0.4}');

-- [FAILURE] Expected to succeed, but actual error 1210
CREATE VECTOR INDEX idx1 ON t1(c2)
  WITH (lib=vsag, type=sindi, distance=inner_product, drop_ratio_search=0.1);

-- [CONTROL] Usually succeeds without drop_ratio_search
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT, c2 SPARSEVECTOR);
INSERT INTO t1 VALUES (1, '{1:0.1,2:0.2, 3:0.3}');
CREATE VECTOR INDEX idx2 ON t1(c2)
  WITH (lib=vsag, type=sindi, distance=inner_product);

Actual Result

The CREATE VECTOR INDEX statement with drop_ratio_search specified fails with error 1210.

Impact

This bug prevents users from creating sparse vector indexes with the drop_ratio_search parameter, which is a valid configuration for optimizing search performance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running vector_index.sparse_vector_rebuild_refresh_index or the direct SQL reproduction for CREATE VECTOR INDEX with SINDI, VSAG, and drop_ratio_search. Trace the error 1210 path for sparse-vector index creation and compare it with the successful case without that parameter. Done means the parameterized index is created successfully and the regression test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
databases, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.