fix: improved performance of early termination-related code#140
fix: improved performance of early termination-related code#140
Conversation
Linux debug test results 8 files 8 suites 13m 32s ⏱️ Results for commit 038e762. ♻️ This comment has been updated with latest results. |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/mcl/auto-embeddings-concurrent.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test_concurrent (
title TEXT,
status INTEGER,
vec FLOAT_VECTOR KNN_TYPE='hnsw' HNSW_SIMILARITY='l2'
MODEL_NAME='sentence-transformers/all-MiniLM-L6-v2'
FROM='title'
)"; echo $?
––– output –––
OK
––– input –––
for i in {1..20}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'Document $i', 0)" 2>/dev/null
done
echo "Initial insert completed"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
for i in {21..30}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'New doc $i', 1)" 2>/dev/null &
done
for i in {1..5}; do
mysql -h0 -P9306 -e "DELETE FROM test_concurrent WHERE id = $i" 2>/dev/null &
done
for i in {6..10}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Replaced doc $i', 2)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "SELECT COUNT(*) as total FROM test_concurrent"
––– output –––
OK
––– input –––
rm -f /tmp/race_test.err
for i in {1..10}; do
(mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES (999, 'Race $i', $i)" 2>>/tmp/race_test.err) &
done
wait; echo $?
––– output –––
OK
––– input –––
wc -l /tmp/race_test.err | awk '{print $1 " error lines in file"}'
––– output –––
OK
––– input –––
grep -c "duplicate id" /tmp/race_test.err
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM test_concurrent WHERE id = 999"
––– output –––
OK
––– input –––
for i in {11..15}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Updated doc $i', 3)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id, KNN_DIST() as dist FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+------------+
| id | dist |
+------+------------+
- | 13 | #!/0\.318[0-9]*/!# |
+ | 6 | 0.84074867 |
- | 11 | #!/0\.331[0-9]*/!# |
+ | 9 | 0.85754889 |
- | 12 | #!/0\.333[0-9]*/!# |
+ | 10 | 0.85960710 |
- | 14 | #!/0\.342[0-9]*/!# |
+ | 8 | 0.86155832 |
- | 15 | #!/0\.351[0-9]*/!# |
+ | 27 | 0.97810590 |
+------+------------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+
| id |
+------+
- | 13 |
+ | 6 |
- | 11 |
+ | 9 |
- | 12 |
+ | 10 |
- | 14 |
+ | 8 |
- | 15 |
+ | 27 |
+------+
––– input –––
for test_num in {1..3}; do
rm -f /tmp/test${test_num}.err
mysql -h0 -P9306 -e "CREATE TABLE race$test_num (title TEXT)" 2>/dev/null
for i in {1..10}; do
(stdbuf -oL mysql -h0 -P9306 -e "INSERT INTO race$test_num (id, title) VALUES (888, 'test')" 2>>/tmp/test${test_num}.err) &
done
wait
echo "Test $test_num: $(wc -l /tmp/test${test_num}.err | awk '{print $1}') lines, $(grep -c 'duplicate' /tmp/test${test_num}.err) duplicate errors"
done
––– output –––
OK |
Windows test results 5 files 5 suites 18m 46s ⏱️ Results for commit 038e762. ♻️ This comment has been updated with latest results. |
Linux release test results 8 files 8 suites 6m 35s ⏱️ Results for commit 038e762. ♻️ This comment has been updated with latest results. |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/mcl/auto-embeddings-concurrent.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test_concurrent (
title TEXT,
status INTEGER,
vec FLOAT_VECTOR KNN_TYPE='hnsw' HNSW_SIMILARITY='l2'
MODEL_NAME='sentence-transformers/all-MiniLM-L6-v2'
FROM='title'
)"; echo $?
––– output –––
OK
––– input –––
for i in {1..20}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'Document $i', 0)" 2>/dev/null
done
echo "Initial insert completed"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
for i in {21..30}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'New doc $i', 1)" 2>/dev/null &
done
for i in {1..5}; do
mysql -h0 -P9306 -e "DELETE FROM test_concurrent WHERE id = $i" 2>/dev/null &
done
for i in {6..10}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Replaced doc $i', 2)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "SELECT COUNT(*) as total FROM test_concurrent"
––– output –––
OK
––– input –––
rm -f /tmp/race_test.err
for i in {1..10}; do
(mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES (999, 'Race $i', $i)" 2>>/tmp/race_test.err) &
done
wait; echo $?
––– output –––
OK
––– input –––
wc -l /tmp/race_test.err | awk '{print $1 " error lines in file"}'
––– output –––
OK
––– input –––
grep -c "duplicate id" /tmp/race_test.err
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM test_concurrent WHERE id = 999"
––– output –––
OK
––– input –––
for i in {11..15}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Updated doc $i', 3)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id, KNN_DIST() as dist FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+------------+
| id | dist |
+------+------------+
- | 13 | #!/0\.318[0-9]*/!# |
+ | 7 | 0.83201891 |
- | 11 | #!/0\.331[0-9]*/!# |
+ | 6 | 0.84074867 |
- | 12 | #!/0\.333[0-9]*/!# |
+ | 8 | 0.86155832 |
- | 14 | #!/0\.342[0-9]*/!# |
+ | 27 | 0.97810590 |
- | 15 | #!/0\.351[0-9]*/!# |
+ | 23 | 1.019263 |
+------+------------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+
| id |
+------+
- | 13 |
+ | 7 |
- | 11 |
+ | 6 |
- | 12 |
+ | 8 |
- | 14 |
+ | 27 |
- | 15 |
+ | 23 |
+------+
––– input –––
for test_num in {1..3}; do
rm -f /tmp/test${test_num}.err
mysql -h0 -P9306 -e "CREATE TABLE race$test_num (title TEXT)" 2>/dev/null
for i in {1..10}; do
(stdbuf -oL mysql -h0 -P9306 -e "INSERT INTO race$test_num (id, title) VALUES (888, 'test')" 2>>/tmp/test${test_num}.err) &
done
wait
echo "Test $test_num: $(wc -l /tmp/test${test_num}.err | awk '{print $1}') lines, $(grep -c 'duplicate' /tmp/test${test_num}.err) duplicate errors"
done
––– output –––
OK |
clt❌ CLT tests in Failed tests:🔧 Edit failed tests in UI: test/clt-tests/mcl/auto-embeddings-concurrent.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test_concurrent (
title TEXT,
status INTEGER,
vec FLOAT_VECTOR KNN_TYPE='hnsw' HNSW_SIMILARITY='l2'
MODEL_NAME='sentence-transformers/all-MiniLM-L6-v2'
FROM='title'
)"; echo $?
––– output –––
OK
––– input –––
for i in {1..20}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'Document $i', 0)" 2>/dev/null
done
echo "Initial insert completed"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
for i in {21..30}; do
mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES ($i, 'New doc $i', 1)" 2>/dev/null &
done
for i in {1..5}; do
mysql -h0 -P9306 -e "DELETE FROM test_concurrent WHERE id = $i" 2>/dev/null &
done
for i in {6..10}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Replaced doc $i', 2)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "SELECT COUNT(*) as total FROM test_concurrent"
––– output –––
OK
––– input –––
rm -f /tmp/race_test.err
for i in {1..10}; do
(mysql -h0 -P9306 -e "INSERT INTO test_concurrent (id, title, status) VALUES (999, 'Race $i', $i)" 2>>/tmp/race_test.err) &
done
wait; echo $?
––– output –––
OK
––– input –––
wc -l /tmp/race_test.err | awk '{print $1 " error lines in file"}'
––– output –––
OK
––– input –––
grep -c "duplicate id" /tmp/race_test.err
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM test_concurrent WHERE id = 999"
––– output –––
OK
––– input –––
for i in {11..15}; do
mysql -h0 -P9306 -e "REPLACE INTO test_concurrent (id, title, status) VALUES ($i, 'Updated doc $i', 3)" 2>/dev/null &
done
wait
mysql -h0 -P9306 -e "FLUSH RAMCHUNK test_concurrent; OPTIMIZE TABLE test_concurrent OPTION sync=1, cutoff=1"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id, KNN_DIST() as dist FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+------------+
| id | dist |
+------+------------+
- | 13 | #!/0\.318[0-9]*/!# |
+ | 6 | 0.84074867 |
- | 11 | #!/0\.331[0-9]*/!# |
+ | 9 | 0.85754889 |
- | 12 | #!/0\.333[0-9]*/!# |
+ | 27 | 0.97810590 |
- | 14 | #!/0\.342[0-9]*/!# |
+ | 23 | 1.019263 |
- | 15 | #!/0\.351[0-9]*/!# |
+ | 30 | 1.03935623 |
+------+------------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM test_concurrent WHERE KNN(vec, 5, 'Updated doc') LIMIT 5"
––– output –––
+------+
| id |
+------+
- | 13 |
+ | 6 |
- | 11 |
+ | 9 |
- | 12 |
+ | 27 |
- | 14 |
+ | 23 |
- | 15 |
+ | 30 |
+------+
––– input –––
for test_num in {1..3}; do
rm -f /tmp/test${test_num}.err
mysql -h0 -P9306 -e "CREATE TABLE race$test_num (title TEXT)" 2>/dev/null
for i in {1..10}; do
(stdbuf -oL mysql -h0 -P9306 -e "INSERT INTO race$test_num (id, title) VALUES (888, 'test')" 2>>/tmp/test${test_num}.err) &
done
wait
echo "Test $test_num: $(wc -l /tmp/test${test_num}.err | awk '{print $1}') lines, $(grep -c 'duplicate' /tmp/test${test_num}.err) duplicate errors"
done
––– output –––
OK |
No description provided.