Skip to content

fix: improved performance of early termination-related code#140

Merged
glookka merged 3 commits intomasterfrom
patience_perf_improvements
Mar 9, 2026
Merged

fix: improved performance of early termination-related code#140
glookka merged 3 commits intomasterfrom
patience_perf_improvements

Conversation

@glookka
Copy link
Contributor

@glookka glookka commented Mar 8, 2026

No description provided.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Linux debug test results

  8 files    8 suites   13m 32s ⏱️
511 tests 487 ✅ 24 💤 0 ❌
525 runs  501 ✅ 24 💤 0 ❌

Results for commit 038e762.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

clt

❌ CLT tests in test/clt-tests/mcl/
✅ OK: 15
❌ Failed: 1
⏳ Duration: 525s
👉 Check Action Results for commit 97cd226

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

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Windows test results

  5 files    5 suites   18m 46s ⏱️
491 tests 473 ✅ 18 💤 0 ❌
499 runs  481 ✅ 18 💤 0 ❌

Results for commit 038e762.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Linux release test results

  8 files    8 suites   6m 35s ⏱️
511 tests 493 ✅ 18 💤 0 ❌
525 runs  507 ✅ 18 💤 0 ❌

Results for commit 038e762.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

clt

❌ CLT tests in test/clt-tests/mcl/
✅ OK: 15
❌ Failed: 1
⏳ Duration: 513s
👉 Check Action Results for commit 97cd226

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

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

clt

❌ CLT tests in test/clt-tests/mcl/
✅ OK: 15
❌ Failed: 1
⏳ Duration: 514s
👉 Check Action Results for commit 6352bef

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

@glookka glookka merged commit 91ea1a2 into master Mar 9, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant