utility.wait_for_index_building_complete() return but index creation not finished? #42145
-
Hello everyone, I want to test the time for creating index with 10 million data . I did something like this with pymilvus verison 2.5.6 and Milvus Distributed Mode
and it costs only 1.6 seconds! That is amazing. However if I immediately use
Therefore I am confused whether the index is actually created. My question is
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
create_index() is called before insert():
The index_building_progress() shows {'total_rows': 30000, 'indexed_rows': 0, 'pending_index_rows': 30000, 'state': 'Finished'}
create_index() is called after insert():
The index_building_progress() shows {'total_rows': 30000, 'indexed_rows': 30000, 'pending_index_rows': 0, 'state': 'Finished'}
The state=Finished is not a reliable flag to know index work is done or not, it means the index is created and ready to build. "indexed_rows" and "pending_index_rows" are the major values to observe index work. |
Beta Was this translation helpful? Give feedback.
-
After all data is inserted, there might be compaction tasks pending, some small segments are indexed, but they need to be merged later. So, the index node will continue to build index for merged segments. |
Beta Was this translation helpful? Give feedback.
create_index() is called before insert():