[Bug]: vector index:create index which lists=1000 reported file 018e79d2-44ae-714c-9acf-15798c49c41b_00000 is not found
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Branch Name
main
Commit ID
b85d7579eec4ca041b63ecf8cf9ceef325f59071
Other Environment Information
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
gist 960dim 100M create index lists=1000 reported error file 018e79d2-44ae-714c-9acf-15798c49c41b_00000 is not found
Expected Behavior
No response
Steps to Reproduce
1.create table t3(a int, b vecf32(960));
1.use benchmark tool load gist 960dim 100M data
2.create index idx3 using ivfflat on t3(b) lists=1000 op_type "vector_l2_ops";
Additional information
No response
Internally "CREATE INDEX" is running only 3 SQL queries.
I think it is similar to this issue: https://github.com/matrixorigin/matrixone/issues/14529
@triump2020 could you kindly have a look at this?
- Create the database and table
create database a;
use a;
create table t3(a int, b vecf32(960));
-
Download GIST dataset and unzip http://corpus-texmex.irisa.fr/
-
Run the python code to insert GIST960 data. Replace
/Users/arjunsunilkumar/Downloads/benchmark/1million/gist/gist_base.fvecs
import binascii
import time
import numpy as np
from sqlalchemy import create_engine, text
from sqlalchemy.orm import sessionmaker
def to_db_binary(value):
if value is None:
return value
value = np.asarray(value, dtype='<f4')
if value.ndim != 1:
raise ValueError('expected ndim to be 1')
return binascii.b2a_hex(value.tobytes()).decode('utf-8')
def fvecs_read(filename, c_contiguous=True):
fv = np.fromfile(filename, dtype=np.float32)
if fv.size == 0:
return np.zeros((0, 0))
dim = fv.view(np.int32)[0]
assert dim > 0
fv = fv.reshape(-1, 1 + dim)
fv = fv[:, 1:]
if c_contiguous:
fv = np.ascontiguousarray(fv)
return fv
def run():
# use pymysql
engine = create_engine("mysql+pymysql://root:[email protected]:6001/a")
Session = sessionmaker(bind=engine)
session = Session()
sql_insert = text("INSERT INTO t5 (a, b) VALUES (:id, decode(:data,'hex'));")
start = time.time()
vecList = fvecs_read("/Users/arjunsunilkumar/Downloads/benchmark/1million/gist/gist_base.fvecs")
binVecList = []
for i in range(0, len(vecList)):
binVecList.append(to_db_binary(vecList[i]))
print(f"binary duration={time.time() - start}")
for i in range(0, len(binVecList)):
session.execute(sql_insert, {"id": i, "data": binVecList[i]})
if i % 1000 == 0:
print(f"inserted {i}")
# commit last
session.commit()
def main():
start = time.time()
run()
duration = time.time() - start
print(f"duration={duration}")
if __name__ == "__main__":
main()
- Create index using this query
create index idx3 using ivfflat on t3(b) lists=1000 op_type "vector_l2_ops";
blocked
Not working on this
Not working on this
reassigned to @volgariver6
本地试了一次,没有复现,需要多试一下
暂无进展
暂无进展
reporduced on local, the not found is caused by GC delete. and this object was merged before that deletes.
grep "018f4cd6-8533-76db-9005-bb00a47c7cb7_00000" matrixone/mo-service.log
{"level":"INFO","time":"2024/05/06 15:59:36.115022 +0800","caller":"merge/executor.go:231","msg":"[Mergeblocks] Scheduled 272505-t3 [t1224|on2,bn2|1.99MB,11.95MB], merged(538): 269(3cfb75799ece) 269(bb00a47c7cb7)"}
{"level":"INFO","time":"2024/05/06 15:59:36.115169 +0800","caller":"mergesort/task.go:107","msg":"[Start] Mergeblocks","table":"t3","txn-start-ts":"1714982376115110051-0","from-objs":"3cfb75799ece,bb00a47c7cb7,"}
{"level":"INFO","time":"2024/05/06 17:02:41.595889 +0800","caller":"gc/delete.go:70","msg":"[DB GC] disableGC: false, files to delete: [018f4cd6-90ab-7017-9561-9a6d307b84d5_00000 018f4cd6-8533-76db-9005-bb00a47c7cb7_00000 018f4ce8-ff67-75dd-a631-89144e5f221f_00000 018f4ce8-f0b5-7482-a28d-eaff168ce745_00000 ...
{"level":"ERROR","time":"2024/05/06 17:04:02.164434 +0800","caller":"fileservice/local_fs.go:435","msg":"error: file 018f4cd6-8533-76db-9005-bb00a47c7cb7_00000 is not found"}
{"level":"ERROR","time":"2024/05/06 17:28:23.583578 +0800","name":"log-service.frontend","caller":"frontend/mysql_cmd_executor.go:3202","msg":"file 018f4cd6-8533-76db-9005-bb00a47c7cb7_00000 is not found","uuid":"7c4dccb4-4d3c-41f8-b482-5251dc7a41bf","session_info":"connectionId 1001|127.0.0.1:16722|{account sys:dump:moadmin -- 0:1:0}|goRoutineId 580147|018f4ce9-443a-7ec4-8fcb-bb310673af9e","session_id":"018f4ce9-443a-7ec4-8fcb-bb310673af9e","statement_id":"018f4ce9-bf37-7471-bce3-02a5dd3d7fb9","txn_id":"018f4ce9bf37786a969e56e99819076a/Active/S:1714982338357691859-1"}
the log mo-service (1).log.zip
the ts of that aborted txn is smaller than the merge ts, so this not found err is not expected.
1714982338357691859-1
1714982376115110051-0 merge ts
this created index txn lasted too long, exceeded 1h.
这个事务运行时间超过1小时了,为什么会出现这种事务,我们soft delete的数据,超过1个小时就会被gc。所以这个是预期的
无进展
无进展
无进展
无进展
无进展
无进展
无进展
无进展
暂无进展
暂无进展
无进展
这个需要GC消费cn最小的txn时间戳才可以实现
这个需要GC消费cn最小的txn时间戳才可以实现
这个需要GC消费cn最小的txn时间戳才可以实现
这个需要GC消费cn最小的txn时间戳才可以实现
这个需要GC消费cn最小的txn时间戳才可以实现
这个需要GC消费cn最小的txn时间戳才可以实现
同上