-
Notifications
You must be signed in to change notification settings - Fork 6
Converted numeric values to string in responses for autocomplete calls #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/buddy/test-show-version.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 "show version\G;"
––– output –––
- Component: Knn
+ Component: KNN
- Component: Embeddings
+ Component: Daemon
test/clt-tests/buddy/test-inconsistent-comunication-with-buddy.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 –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- "Component": "Knn",
+ "Component": "KNN",
- "Component": "Embeddings",
+ "Component": "Daemon",
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- "Component": "Knn",
+ "Component": "KNN",
- "Component": "Embeddings",
+ "Component": "Daemon",
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- "Component": "Knn",
+ "Component": "KNN",
- "Component": "Embeddings",
+ "Component": "Daemon",
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- "Component": "Knn",
+ "Component": "KNN",
- "Component": "Embeddings",
+ "Component": "Daemon",
test/clt-tests/buddy/test-fuzzy-search.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 –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- | 2154 | TONY GREY | a |
+ | 1721 | JOE TONG | a |
- | 3759 | TOBY GILCHRIST | a |
+ | 2154 | TONY GREY | a |
- | 5687 | TONY EASTERLING | a |
+ | 3759 | TOBY GILCHRIST | a |
- | 5835 | TOBY ROBERSON | a |
+ | 5292 | TONA VALENTIN | a |
- | 6281 | TOBY ARAIZA | a |
+ | 5687 | TONY EASTERLING | a |
- | 7311 | ANTONY STOVALL | a |
+ | 5835 | TOBY ROBERSON | a |
- | 7475 | TOBY REINHART | a |
+ | 6281 | TOBY ARAIZA | a |
- | 8828 | TONYA CALLAHAN | a |
+ | 6962 | TONA DAVIDSON | a |
- | 9251 | TOBY LANGFORD | a |
+ | 7311 | ANTONY STOVALL | a |
- | 9293 | ZENA STORY | a |
+ | 7475 | TOBY REINHART | a |
- | 9619 | TONY WHITTINGTON | a |
+ | 8174 | TONA CARRILLO | a |
- | 10167 | LANA STORY | a |
+ | 8700 | TONA FLETCHER | a |
- | 10341 | ANTONY KAYE | a |
+ | 8828 | TONYA CALLAHAN | a |
- | 12573 | LATONYA CRABTREE | a |
+ | 9251 | TOBY LANGFORD | a |
- | 12876 | TOBY MONTENEGRO | a |
+ | 9293 | ZENA STORY | a |
- | 13391 | ANTONY CARRILLO | a |
+ | 9619 | TONY WHITTINGTON | a |
- | 13672 | LEZLIE STORY | a |
+ | 10167 | LANA STORY | a |
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
- +--------+----------------+------+
+ +--------+--------------------+------+
- | id | username | s |
+ | id | username | s |
- +--------+----------------+------+
+ +--------+--------------------+------+
- | 998829 | EDYTHE VACA | a |
+ | 999921 | VICKI SOUTHARD | a |
- | 998500 | SETH PHUNG | a |
+ | 998829 | EDYTHE VACA | a |
- | 996507 | SETH LYMAN | a |
+ | 998500 | SETH PHUNG | a |
- | 995119 | EDYTHE JOHN | a |
+ | 996507 | SETH LYMAN | a |
- | 993455 | EDYTH ROSADO | a |
+ | 995690 | ROBERTO SOUTHARD | a |
- | 992097 | EDYTH RAGAN | a |
+ | 995663 | CHUNG SOUTH | a |
- | 989954 | GWENN SMYTH | a |
+ | 995119 | EDYTHE JOHN | a |
- | 988823 | SETH WHITTAKER | a |
+ | 993455 | EDYTH ROSADO | a |
- | 988755 | SHERRON SMYTH | a |
+ | 993278 | LAKITA SOUTHARD | a |
- | 988366 | LAVONIA SMYTH | a |
+ | 992097 | EDYTH RAGAN | a |
- | 986580 | DARNELL SMYTH | a |
+ | 989954 | GWENN SMYTH | a |
- | 986231 | EDYTH BLODGETT | a |
+ | 988936 | LARISA SOUTHERLAND | a |
- | 985595 | SETH BACON | a |
+ | 988823 | SETH WHITTAKER | a |
- | 982423 | SETH CHATMAN | a |
+ | 988759 | LIEN SOUTHARD | a |
- | 981115 | KATIE SMYTH | a |
+ | 988755 | SHERRON SMYTH | a |
- | 979541 | EDYTHE CLAYTON | a |
+ | 988366 | LAVONIA SMYTH | a |
- | 979093 | SETH BURROUGHS | a |
+ | 987165 | TULA SOUTHARD | a |
- | 978812 | EDYTH GULLEY | a |
+ | 987136 | LUANN SOUTHARD | a |
- | 975994 | SETH PARHAM | a |
+ | 986847 | JORDAN SOUTHERN | a |
- | 975841 | ALEIDA SMYTH | a |
+ | 986711 | MARLIN SOUTHERN | a |
- +--------+----------------+------+
+ +--------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=\"1\";"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), field_weights=(username=1), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, field_weights=(username=1), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC OPTION fuzzy=0;" > /tmp/result_fuzzy0.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC;" > /tmp/result_no_fuzzy.txt
––– output –––
OK
––– input –––
diff /tmp/result_fuzzy0.txt /tmp/result_no_fuzzy.txt; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS tbl1; CREATE TABLE tbl1 (title TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM \`tbl1\` WHERE MATCH('abc') OPTION fuzzy = 1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; DEBUG SLEEP 2; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into t values(3, 'aa defghi xxx');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('aa def ghi xxx') option fuzzy=1, layouts='';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
OK
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
OK
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf; echo $?
––– output –––
OK
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv; echo $?
––– output –––
OK
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain; echo $?
––– output –––
OK
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
rm -f /tmp/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; (stdbuf -oL searchd -c /tmp/manticore_idx.conf 2>&1 | tee /tmp/searchd.log | grep -i precach & disown); sleep 0.5; if timeout 10 grep -qm1 '\[BUDDY\] started' /tmp/searchd.log; then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /tmp/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
OK test/clt-tests/buddy/test-fuzzy-autocomplete-http.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 –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"EBGRNA"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"ANT"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"tony"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
- "total": 1813,
+ "total": 2200,
- "_id": 800363,
+ "_id": 1721,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY BEAULIEU",
+ "username": "JOE TONG",
- "_id": 807095,
+ "_id": 5292,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY HOFER",
+ "username": "TONA VALENTIN",
- "_id": 807096,
+ "_id": 6962,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY DEMPSEY",
+ "username": "TONA DAVIDSON",
- "_id": 808820,
+ "_id": 8174,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY RAYMOND",
+ "username": "TONA CARRILLO",
- "_id": 808863,
+ "_id": 8700,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY BATEMAN",
+ "username": "TONA FLETCHER",
- "_id": 813761,
+ "_id": 11975,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY VANWINKLE",
+ "username": "CAMILLA TONG",
- "_id": 818229,
+ "_id": 15241,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY BROCK",
+ "username": "TONA FENG",
- "_id": 825472,
+ "_id": 15914,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY LINDQUIST",
+ "username": "TONA POINDEXTER",
- "_id": 826251,
+ "_id": 16361,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY KAUFFMAN",
+ "username": "TONA HIGGS",
- "_id": 827886,
+ "_id": 17120,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY PITMAN",
+ "username": "TONA ARCHER",
- "_id": 832558,
+ "_id": 18205,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY KELLEY",
+ "username": "KIMBRA TONG",
- "_id": 833689,
+ "_id": 19344,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY HANDY",
+ "username": "JOSEF TONG",
- "_id": 834136,
+ "_id": 23070,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY HOPPE",
+ "username": "TONA YUN",
- "_id": 836413,
+ "_id": 25266,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY STOVALL",
+ "username": "TONA OVIEDO",
- "_id": 839075,
+ "_id": 27082,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY JEROME",
+ "username": "ROZELLA TONG",
- "_id": 839512,
+ "_id": 31839,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY LEONARD",
+ "username": "MELANI TONG",
- "_id": 841923,
+ "_id": 36735,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY PARNELL",
+ "username": "KANESHA TONG",
- "_id": 842450,
+ "_id": 39741,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY LOWE",
+ "username": "TONA GRAFF",
- "_id": 843217,
+ "_id": 41701,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY ROBISON",
+ "username": "KARISA TONG",
- "_id": 846291,
+ "_id": 53822,
- "_score": 1547,
+ "_score": 1531,
- "username": "TOBY BITTNER",
+ "username": "ROSALINDA TONG",
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMITH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMYTH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
- "total": 773,
+ "total": 1567,
- "_id": 998829,
+ "_id": 999921,
- "username": "EDYTHE VACA",
+ "username": "VICKI SOUTHARD",
- "_id": 998500,
+ "_id": 998829,
- "username": "SETH PHUNG",
+ "username": "EDYTHE VACA",
- "_id": 996507,
+ "_id": 998500,
- "username": "SETH LYMAN",
+ "username": "SETH PHUNG",
- "_id": 995119,
+ "_id": 996507,
- "username": "EDYTHE JOHN",
+ "username": "SETH LYMAN",
- "_id": 993455,
+ "_id": 995690,
- "username": "EDYTH ROSADO",
+ "username": "ROBERTO SOUTHARD",
- "_id": 992097,
+ "_id": 995663,
- "username": "EDYTH RAGAN",
+ "username": "CHUNG SOUTH",
- "_id": 989954,
+ "_id": 995119,
- "username": "GWENN SMYTH",
+ "username": "EDYTHE JOHN",
- "_id": 988823,
+ "_id": 993455,
- "username": "SETH WHITTAKER",
+ "username": "EDYTH ROSADO",
- "_id": 988755,
+ "_id": 993278,
- "username": "SHERRON SMYTH",
+ "username": "LAKITA SOUTHARD",
- "_id": 988366,
+ "_id": 992097,
- "username": "LAVONIA SMYTH",
+ "username": "EDYTH RAGAN",
- "_id": 986580,
+ "_id": 989954,
- "username": "DARNELL SMYTH",
+ "username": "GWENN SMYTH",
- "_id": 986231,
+ "_id": 988936,
- "username": "EDYTH BLODGETT",
+ "username": "LARISA SOUTHERLAND",
- "_id": 985595,
+ "_id": 988823,
- "username": "SETH BACON",
+ "username": "SETH WHITTAKER",
- "_id": 982423,
+ "_id": 988759,
- "username": "SETH CHATMAN",
+ "username": "LIEN SOUTHARD",
- "_id": 981115,
+ "_id": 988755,
- "username": "KATIE SMYTH",
+ "username": "SHERRON SMYTH",
- "_id": 979541,
+ "_id": 988366,
- "username": "EDYTHE CLAYTON",
+ "username": "LAVONIA SMYTH",
- "_id": 979093,
+ "_id": 987165,
- "username": "SETH BURROUGHS",
+ "username": "TULA SOUTHARD",
- "_id": 978812,
+ "_id": 987136,
- "username": "EDYTH GULLEY",
+ "username": "LUANN SOUTHARD",
- "_id": 975994,
+ "_id": 986847,
- "username": "SETH PARHAM",
+ "username": "JORDAN SOUTHERN",
- "_id": 975841,
+ "_id": 986711,
- "username": "ALEIDA SMYTH",
+ "username": "MARLIN SOUTHERN",
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"layouts":"us,ru"}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"append":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":0}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":1,"append":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1,"layouts":"","append":1,"prepend":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":2,"layouts":"us,ru","append":1,"prepend":1,"expansion_len":2}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"gr","options":{"fuzziness":1,"layouts":"ru","append":1,"prepend":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1}}' | jq -M
––– output –––
OK test/clt-tests/buddy/test-prometheus-exporter.rec––– input –––
export SEARCHD_FLAGS="--iostats --cpustats"
––– output –––
OK
––– 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 –––
curl -s 0:9308/metrics > /tmp/exporter_unfiltered_output.txt
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep -e "^manticore" | cut -d" " -f1 | sed 's/^manticore_//' | sed 's/qcache_thresh_microseconds/qcache_thresh_msec/' | sort > /tmp/exporter_output.txt
––– output –––
OK
––– input –––
searchd --iostats --cpustats --status | cut -d":" -f1 | tail -n +10 | sort > /tmp/searchd_output.txt
––– output –––
OK
––– input –––
ls -1 /tmp
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep "Warning"
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
+ agent_connect
+ agent_retry
+ agent_tfo
+ avg_dist_local
+ avg_dist_wait
+ avg_dist_wall
+ avg_query_cpu
+ avg_query_readkb
+ avg_query_reads
+ avg_query_readtime
+ avg_query_wall
+ command_callpq
+ command_cluster
+ command_commit
+ command_delete
+ command_excerpt
+ command_flushattrs
+ command_getfield
+ command_insert
+ command_json
+ command_keywords
+ command_persist
+ command_ping
+ command_replace
+ command_search
+ command_set
+ command_sphinxql
+ command_status
+ command_suggest
+ command_update
+ connections
+ dist_local
+ dist_queries
+ dist_wait
+ dist_wall
+ insert_replace_stats_ms_avg
+ insert_replace_stats_ms_max
+ insert_replace_stats_ms_min
+ insert_replace_stats_ms_pct95
+ insert_replace_stats_ms_pct99
+ load
+ load_primary
+ load_secondary
+ maxed_out
+ mysql_version
+ qcache_cached_queries
+ qcache_hits
+ qcache_max_bytes
+ qcache_thresh_msec
+ qcache_ttl_sec
+ qcache_used_bytes
+ queries
+ query_cpu
+ query_readkb
+ query_reads
+ query_readtime
+ query_wall
+ search_stats_ms_avg
+ search_stats_ms_max
+ search_stats_ms_min
+ search_stats_ms_pct95
+ search_stats_ms_pct99
+ update_stats_ms_avg
+ update_stats_ms_max
+ update_stats_ms_min
+ update_stats_ms_pct95
+ update_stats_ms_pct99
+ uptime
+ version
+ workers_active
+ workers_clients
+ workers_clients_buddy
+ workers_clients_vip
+ workers_total
+ work_queue_length
––– input –––
echo "new-option" >> /tmp/searchd_output.txt
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
- new-option
+ agent_connect
+ agent_retry
+ agent_tfo
+ avg_dist_local
+ avg_dist_wait
+ avg_dist_wall
+ avg_query_cpu
+ avg_query_readkb
+ avg_query_reads
+ avg_query_readtime
+ avg_query_wall
+ command_callpq
+ command_cluster
+ command_commit
+ command_delete
+ command_excerpt
+ command_flushattrs
+ command_getfield
+ command_insert
+ command_json
+ command_keywords
+ command_persist
+ command_ping
+ command_replace
+ command_search
+ command_set
+ command_sphinxql
+ command_status
+ command_suggest
+ command_update
+ connections
+ dist_local
+ dist_queries
+ dist_wait
+ dist_wall
+ insert_replace_stats_ms_avg
+ insert_replace_stats_ms_max
+ insert_replace_stats_ms_min
+ insert_replace_stats_ms_pct95
+ insert_replace_stats_ms_pct99
+ load
+ load_primary
+ load_secondary
+ maxed_out
+ mysql_version
+ qcache_cached_queries
+ qcache_hits
+ qcache_max_bytes
+ qcache_thresh_msec
+ qcache_ttl_sec
+ qcache_used_bytes
+ queries
+ query_cpu
+ query_readkb
+ query_reads
+ query_readtime
+ query_wall
+ search_stats_ms_avg
+ search_stats_ms_max
+ search_stats_ms_min
+ search_stats_ms_pct95
+ search_stats_ms_pct99
+ update_stats_ms_avg
+ update_stats_ms_max
+ update_stats_ms_min
+ update_stats_ms_pct95
+ update_stats_ms_pct99
+ uptime
+ version
+ workers_active
+ workers_clients
+ workers_clients_buddy
+ workers_clients_vip
+ workers_total
+ work_queue_length
+ new-option
|
clt❌ CLT tests in test/clt-tests/core/test-manticore-version-in-telemetry.rec––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
sed -i '/data_dir = \/var\/lib\/manticore/a\ buddy_path = manticore-executor -n /usr/share/manticore/modules/manticore-buddy/src/main.php --debugvv --telemetry-period=5' /etc/manticoresearch/manticore.conf
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
timeout 60 bash -c 'grep -m 1 "labels:" <(tail -f /var/log/manticore/searchd.log) | sed "s/.*labels: //" | jq -M .'
––– output –––
- {
- "collector": "buddy",
- "os_name": "Linux",
- "os_release_name": "Ubuntu",
- "os_release_version": "%{SEMVER} LTS (#!/[A-Za-z]+\s[A-Za-z]+/!#)",
- "machine_type": "x86_64",
- "machine_id": "#!/[0-9A-Za-z]+/!#",
- "dockerized": "#!/\b(?:unknown|yes)\b/!#",
- "official_docker": "#!/\b(?:no|yes)\b/!#",
- "buddy_version": "%{VERSION}",
- "manticore_version": "%{VERSION}",
- "columnar_version": "%{VERSION}",
- "secondary_version": "%{VERSION}",
- "knn_version": "%{VERSION}",
- "embeddings_version": "%{VERSION}",
- "manticore_mode": "#!/[A-Za-z]+/!#",
- "manticore_binlog_enabled": "#!/\b(?:no|yes)\b/!#",
- "manticore_auto_optimize_enabled": "#!/\b(?:no|yes)\b/!#",
- "manticore_query_log_format": "#!/[A-Za-z]+/!#",
- "manticore_max_allowed_packet": "%{NUMBER}",
- "manticore_pseudo_sharding_enabled": "#!/\b(?:no|yes)\b/!#",
- "manticore_secondary_indexes_enabled": "#!/\b(?:no|yes)\b/!#",
- "manticore_accurate_aggregation_enabled": "#!/\b(?:no|yes)\b/!#",
- "manticore_distinct_precision_threshold": "%{NUMBER}"
- }
test/clt-tests/core/show-version-trailing-semicolon.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 t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- +------------+----------------------------------+
+ +-----------+----------------------------------+
- | Component | Version |
+ | Component | Version |
- +------------+----------------------------------+
+ +-----------+----------------------------------+
- | Daemon | %{VERSION} #!/\s*/!#|
+ | Daemon | 0.0.0 b5f8d154c@25060613 |
- | Columnar | columnar %{VERSION} #!/\s*/!#|
+ | Columnar | columnar 5.0.1 59c7092@25060304 |
- | Secondary | secondary %{VERSION} #!/\s*/!#|
+ | Secondary | secondary 5.0.1 59c7092@25060304 |
- | Knn | knn %{VERSION} #!/\s*/!#|
+ | KNN | knn 5.0.1 59c7092@25060304 |
- | Embeddings | embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)\s*/!#|
+ | Daemon | embeddings 1.0.0 |
- | Buddy | buddy %{VERSION} #!/\s*/!#|
+ | Buddy | buddy v3.28.2-1-ge4dfcb |
- +------------+----------------------------------+
+ +-----------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
- [{"total":%{NUMBER},"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{VERSION}"},{"Component":"Columnar","Version":"columnar %{VERSION}"},{"Component":"Secondary","Version":"secondary %{VERSION}"},{"Component":"Knn","Version":"knn %{VERSION}"},{"Component":"Embeddings","Version":"embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"},{"Component":"Buddy","Version":"buddy %{VERSION}"}]}]
+ [{"total":6,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"0.0.0 b5f8d154c@25060613"},{"Component":"Columnar","Version":"columnar 5.0.1 59c7092@25060304"},{"Component":"Secondary","Version":"secondary 5.0.1 59c7092@25060304"},{"Component":"KNN","Version":"knn 5.0.1 59c7092@25060304"},{"Component":"Daemon","Version":"embeddings 1.0.0"},{"Component":"Buddy","Version":"buddy v3.28.2-1-ge4dfcb"}]}]
––– input –––
curl -s "http://localhost:9308/sql?mode=raw" -d "show version"; echo
––– output –––
- [{"total":%{NUMBER},"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"%{VERSION}"},{"Component":"Columnar","Version":"columnar %{VERSION}"},{"Component":"Secondary","Version":"secondary %{VERSION}"},{"Component":"Knn","Version":"knn %{VERSION}"},{"Component":"Embeddings","Version":"embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"},{"Component":"Buddy","Version":"buddy %{VERSION}"}]}]
+ [{"total":6,"error":"","warning":"","columns":[{"Component":{"type":"string"}},{"Version":{"type":"string"}}],"data":[{"Component":"Daemon","Version":"0.0.0 b5f8d154c@25060613"},{"Component":"Columnar","Version":"columnar 5.0.1 59c7092@25060304"},{"Component":"Secondary","Version":"secondary 5.0.1 59c7092@25060304"},{"Component":"KNN","Version":"knn 5.0.1 59c7092@25060304"},{"Component":"Daemon","Version":"embeddings 1.0.0"},{"Component":"Buddy","Version":"buddy v3.28.2-1-ge4dfcb"}]}]
test/clt-tests/core/test-alter-rename-http.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 –––
sleep 3; mysql -h0 -P9306 -e "CREATE TABLE articles(title text, content text); INSERT INTO articles VALUES(1,'test','content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE products(name text, price float); INSERT INTO products VALUES(1,'laptop',999.99);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE products RENAME products_new"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=SHOW+VERSION" | grep -o '"Component":"Daemon"'
––– output –––
+ "Component":"Daemon"
––– input –––
curl -s "http://localhost:9308/sql?query=SELECT+*+FROM+articles+LIMIT+1" | grep -o '"_id":1'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=SELECT+title,+content+FROM+articles+WHERE+MATCH('test')+LIMIT+10" | grep -o '"title":"test"'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=ALTER+TABLE+nonexistent+RENAME+new_name"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=SELECT%20title+FROM+articles+WHERE%20MATCH('test')" | grep -o '"title":"test"'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO articles(title,content) VALUES('test with spaces','content with special chars');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=SELECT+id,+title,+content+FROM+articles+ORDER+BY+id+DESC+LIMIT+10" | grep -o '"total":2'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=ALTER%20TABLE%20articles%20RENAME%20articles2"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=SELECT+COUNT(*)+AS+cnt+FROM+articles2" | grep -o '"cnt":2'
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?query=ALTER%20TABLE%20articles2%20RENAME%20articles"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES"
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/sharding/replication/create-table-5-nodes-60-shards.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306 4306 5306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='60' rf='3' timeout='60'"
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s2
+ Table: system.t_s3
- Table: system.t_s3
+ Table: system.t_s4
- Table: system.t_s4
+ Table: system.t_s5
- Table: system.t_s5
+ Table: system.t_s6
- Table: system.t_s6
+ Table: system.t_s7
- Table: system.t_s6
+ Table: system.t_s7
- Table: system.t_s7
+ Table: system.t_s8
- Table: system.t_s7
+ Table: system.t_s8
- Table: system.t_s8
+ Table: system.t_s9
- Table: system.t_s8
+ Table: system.t_s9
- Table: system.t_s9
+ Table: system.t_s10
- Table: system.t_s9
+ Table: system.t_s10
- Table: system.t_s10
+ Table: system.t_s11
- Table: system.t_s10
+ Table: system.t_s11
- Table: system.t_s11
+ Table: system.t_s12
- Table: system.t_s11
+ Table: system.t_s12
- Table: system.t_s11
+ Table: system.t_s12
- Table: system.t_s12
+ Table: system.t_s13
- Table: system.t_s12
+ Table: system.t_s13
- Table: system.t_s12
+ Table: system.t_s13
- Table: system.t_s13
+ Table: system.t_s14
- Table: system.t_s13
+ Table: system.t_s14
- Table: system.t_s13
+ Table: system.t_s15
- Table: system.t_s14
+ Table: system.t_s15
- Table: system.t_s14
+ Table: system.t_s15
- Table: system.t_s14
+ Table: system.t_s16
- Table: system.t_s15
+ Table: system.t_s16
- Table: system.t_s15
+ Table: system.t_s16
- Table: system.t_s15
+ Table: system.t_s17
- Table: system.t_s16
+ Table: system.t_s17
- Table: system.t_s16
+ Table: system.t_s17
- Table: system.t_s16
+ Table: system.t_s18
- Table: system.t_s17
+ Table: system.t_s18
- Table: system.t_s17
+ Table: system.t_s19
- Table: system.t_s17
+ Table: system.t_s19
- Table: system.t_s18
+ Table: system.t_s19
- Table: system.t_s18
+ Table: system.t_s20
- Table: system.t_s18
+ Table: system.t_s20
- Table: system.t_s19
+ Table: system.t_s20
- Table: system.t_s19
+ Table: system.t_s21
- Table: system.t_s19
+ Table: system.t_s21
- Table: system.t_s20
+ Table: system.t_s22
- Table: system.t_s20
+ Table: system.t_s22
- Table: system.t_s20
+ Table: system.t_s22
- Table: system.t_s21
+ Table: system.t_s23
- Table: system.t_s21
+ Table: system.t_s23
- Table: system.t_s21
+ Table: system.t_s23
- Table: system.t_s22
+ Table: system.t_s24
- Table: system.t_s22
+ Table: system.t_s24
- Table: system.t_s22
+ Table: system.t_s24
- Table: system.t_s23
+ Table: system.t_s25
- Table: system.t_s23
+ Table: system.t_s25
- Table: system.t_s23
+ Table: system.t_s25
- Table: system.t_s24
+ Table: system.t_s26
- Table: system.t_s24
+ Table: system.t_s26
- Table: system.t_s24
+ Table: system.t_s26
- Table: system.t_s25
+ Table: system.t_s27
- Table: system.t_s25
+ Table: system.t_s27
- Table: system.t_s25
+ Table: system.t_s28
- Table: system.t_s26
+ Table: system.t_s28
- Table: system.t_s26
+ Table: system.t_s28
- Table: system.t_s26
+ Table: system.t_s29
- Table: system.t_s27
+ Table: system.t_s29
- Table: system.t_s27
+ Table: system.t_s29
- Table: system.t_s27
+ Table: system.t_s30
- Table: system.t_s28
+ Table: system.t_s30
- Table: system.t_s28
+ Table: system.t_s30
- Table: system.t_s28
+ Table: system.t_s31
- Table: system.t_s29
+ Table: system.t_s31
- Table: system.t_s29
+ Table: system.t_s31
- Table: system.t_s29
+ Table: system.t_s32
- Table: system.t_s30
+ Table: system.t_s32
- Table: system.t_s30
+ Table: system.t_s33
- Table: system.t_s30
+ Table: system.t_s33
- Table: system.t_s31
+ Table: system.t_s34
- Table: system.t_s31
+ Table: system.t_s34
- Table: system.t_s31
+ Table: system.t_s34
- Table: system.t_s32
+ Table: system.t_s35
- Table: system.t_s32
+ Table: system.t_s35
- Table: system.t_s32
+ Table: system.t_s35
- Table: system.t_s33
+ Table: system.t_s36
- Table: system.t_s33
+ Table: system.t_s36
- Table: system.t_s33
+ Table: system.t_s37
- Table: system.t_s34
+ Table: system.t_s37
- Table: system.t_s34
+ Table: system.t_s37
- Table: system.t_s34
+ Table: system.t_s38
- Table: system.t_s35
+ Table: system.t_s38
- Table: system.t_s35
+ Table: system.t_s38
- Table: system.t_s35
+ Table: system.t_s39
- Table: system.t_s36
+ Table: system.t_s39
- Table: system.t_s36
+ Table: system.t_s39
- Table: system.t_s36
+ Table: system.t_s40
- Table: system.t_s37
+ Table: system.t_s40
- Table: system.t_s37
+ Table: system.t_s40
- Table: system.t_s37
+ Table: system.t_s41
- Table: system.t_s38
+ Table: system.t_s41
- Table: system.t_s38
+ Table: system.t_s42
- Table: system.t_s38
+ Table: system.t_s42
- Table: system.t_s39
+ Table: system.t_s42
- Table: system.t_s39
+ Table: system.t_s43
- Table: system.t_s39
+ Table: system.t_s43
- Table: system.t_s40
+ Table: system.t_s43
- Table: system.t_s40
+ Table: system.t_s44
- Table: system.t_s40
+ Table: system.t_s44
- Table: system.t_s41
+ Table: system.t_s45
- Table: system.t_s41
+ Table: system.t_s45
- Table: system.t_s41
+ Table: system.t_s45
- Table: system.t_s42
+ Table: system.t_s46
- Table: system.t_s42
+ Table: system.t_s46
- Table: system.t_s42
+ Table: system.t_s46
- Table: system.t_s43
+ Table: system.t_s47
- Table: system.t_s43
+ Table: system.t_s47
- Table: system.t_s43
+ Table: system.t_s48
- Table: system.t_s44
+ Table: system.t_s48
- Table: system.t_s44
+ Table: system.t_s48
- Table: system.t_s44
+ Table: system.t_s49
- Table: system.t_s45
+ Table: system.t_s49
- Table: system.t_s45
+ Table: system.t_s49
- Table: system.t_s45
+ Table: system.t_s50
- Table: system.t_s46
+ Table: system.t_s50
- Table: system.t_s46
+ Table: system.t_s50
- Table: system.t_s46
+ Table: system.t_s51
- Table: system.t_s47
+ Table: system.t_s51
- Table: system.t_s47
+ Table: system.t_s52
- Table: system.t_s47
+ Table: system.t_s52
- Table: system.t_s48
+ Table: system.t_s52
- Table: system.t_s48
+ Table: system.t_s53
- Table: system.t_s48
+ Table: system.t_s53
- Table: system.t_s49
+ Table: system.t_s54
- Table: system.t_s49
+ Table: system.t_s54
- Table: system.t_s49
+ Table: system.t_s54
- Table: system.t_s50
+ Table: system.t_s55
- Table: system.t_s50
+ Table: system.t_s55
- Table: system.t_s50
+ Table: system.t_s55
- Table: system.t_s51
+ Table: system.t_s56
- Table: system.t_s51
+ Table: system.t_s56
- Table: system.t_s51
+ Table: system.t_s57
- Table: system.t_s52
+ Table: system.t_s57
- Table: system.t_s52
+ Table: system.t_s58
- Table: system.t_s52
+ Table: system.t_s58
- Table: system.t_s53
+ Table: system.t_s58
- Table: system.t_s53
+ Table: system.t_s59
- Table: system.t_s53
+ Table: system.t_s59
- Table: system.t_s54
+ Table: system.t_s59
- Table: system.t_s54
- Table: system.t_s54
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s59
- Table: system.t_s59
- Table: system.t_s59
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "desc t\G" | grep 'Create Table'; done
––– output –––
+ ERROR 1064 (42000) at line 1: no such table 't'
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 36
+ 19
|
No description provided.