matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: refactor on cn s3 writer

Open cpegeric opened this issue 9 months ago • 1 comments

Is there an existing issue for the same bug?

  • [x] I have checked the existing issues.

Branch Name

main

Commit ID

08b2d2cc679a2da289e0594c51082100e92844c5

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

After create ivf index, index table cannot be selected with both filter __mo_index_centroid_fk_version != 0 or __mo_index_centroid_fk_version = 0.

Image

Expected Behavior

__mo_index_centroid_fk_version = 0 filter should return 1000000 rows

Steps to Reproduce

To reproduce the bug,

create database a;
use a;
create table t3(a int primary key, b vecf32(128));

cd /data1/heni/mo-benchmark-test/sift128
/usr/local/python3/bin/python3.10 insert_mo.py

mysql> SET experimental_ivf_index = 1;

mysql> create index idx3 using ivfflat on t3(b) lists=4000 op_type "vector_l2_ops";


mysql> select count(*) from  `a`.`__mo_index_secondary_0195f7fd-940e-7a44-8ccf-5ec27ec6269e` where __mo_index_centroid_fk_version = 0;
+----------+
| count(*) |
+----------+
|        0 |
+----------+

Additional information

No response

cpegeric avatar Apr 02 '25 19:04 cpegeric

fixed

gouhongshen avatar Apr 22 '25 05:04 gouhongshen

main commit:fcbc898 confirm,closed

mysql> show create table items; +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | items | CREATE TABLEitems(idint NOT NULL,embedding vecf32(960) DEFAULT NULL, PRIMARY KEY (id), KEY ivf_4000 USING ivfflat (embedding`) lists = 4000 op_type 'vector_l2_ops' ) | +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)

mysql> select * from ann.__mo_index_secondary_01987d11-4a8a-768e-8e01-1b1d33a41d62 where __mo_index_centroid_fk_version !=0; Empty set (0.26 sec)

mysql> select count() from ann.__mo_index_secondary_01987d11-4a8a-768e-8e01-1b1d33a41d62 where __mo_index_centroid_fk_version =0; +----------+ | count() | +----------+ | 1000000 | +----------+ 1 row in set (0.01 sec)

mysql> select git_version(); +---------------+ | git_version() | +---------------+ | fcbc898 | +---------------+ 1 row in set (0.00 sec)

`

heni02 avatar Aug 06 '25 08:08 heni02