Skip to content

Updating all blocks in the daemon stop startup #3191

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

Merged
merged 17 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions test/clt-tests/base/replication/start-searchd-precach.recb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:%{NUMBER} for mysql
listening on %{IPADDR}:%{NUMBER} for sphinx and http(s)
listening on %{IPADDR}:%{NUMBER} for sphinx and http(s)
––– 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/searchd.log;fi
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Buddy started!
Accepting connections!
8 changes: 1 addition & 7 deletions test/clt-tests/base/replication/stop-searchd.recb
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
––– input –––
stdbuf -oL searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
stdbuf -oL searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
13 changes: 0 additions & 13 deletions test/clt-tests/base/searchd-without-table-details.recb

This file was deleted.

13 changes: 2 additions & 11 deletions test/clt-tests/base/start-searchd-with-buddy.recb
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
––– input –––
stdbuf -oL searchd; if timeout 10 grep -qm1 'accepting' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Started'; else echo 'Timeout or failed!'; fi
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd > /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 –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Started
Buddy started!
15 changes: 5 additions & 10 deletions test/clt-tests/base/start-searchd-with-cpustats.recb
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
––– input –––
stdbuf -oL searchd --cpustats
stdbuf -oL searchd --cpustats > /dev/null
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9a-zA-Z\:\.\s]+/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
––– 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 –––
Accepting connections!
2 changes: 1 addition & 1 deletion test/clt-tests/buddy/test-fuzzy-search.rec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
––– block: ../base/start-searchd –––
––– block: ../base/start-searchd-with-buddy –––
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
Expand Down
17 changes: 6 additions & 11 deletions test/clt-tests/buddy/test-inconsistency-in-error-messages.rec
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,16 @@
echo -e 'common {\n\tplugin_dir = /usr/local/lib/manticore\n\tlemmatizer_base = /usr/share/manticore/morph/\n}\n\nsearchd {\n\tlisten = 9306:mysql41\n\tlisten = 9312\n\tlisten = 9308:http\n\tlog = /var/log/manticore/searchd.log\n\tquery_log = /var/log/manticore/query.log\n\tpid_file = /var/log/manticore/searchd.pid\n\tdata_dir = /var/log/manticore\n\tquery_log_format = sphinxql\n\tquery_log_commands = 1\n\tbuddy_path =\n}\n' > manticore.conf
––– output –––
––– input –––
stdbuf -oL searchd --config ./manticore.conf
stdbuf -oL searchd --config ./manticore.conf > /dev/null
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/.clt/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on all interfaces for mysql, port=9306
listening on all interfaces for sphinx and http(s), port=9312
listening on all interfaces for sphinx and http(s), port=9308
––– 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 –––
Accepting connections!
––– input –––
mysql -h0 -P9306 -e "drop table if exists a; drop table if exists test; create table a (id BIGINT, model TEXT, storage_capacity INTEGER, color string, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2');create table test type='distributed' local='a';"
––– output –––
––– input –––
for i in {1..100}; do response=$(curl -s -X POST http://localhost:9308/insert -d '{"table": "test", "id": 1, "doc": {"model": "iPhone 13 Pro", "storage_capacity": 256, "color": "silver", "release_year": 2021, "price": 1099.99, "discounted_price": 989.99, "sold": 1, "date_added": 1591362342000, "product_codes": [1,2,3], "values": [523456764345678976,98765409877866654098,1109876543450987650987], "additional_info": {"features": ["ProMotion display", "A15 Bionic chip", "Ceramic Shield front cover"]}, "vector": [0.773448,0.312478,0.137971,0.459821]}}'); if [[ "$response" != *'"error":{"type":"action_request_validation_exception","reason":"table '\''test'\'' does not support INSERT","table":"test"},"status":409'* ]]; then echo "Mismatch found at iteration $i: $response"; exit 1; fi; done; echo "All 100 requests returned the same error"
––– output –––
All 100 requests returned the same error
All 100 requests returned the same error
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
––– block: ../base/start-searchd –––
––– block: ../base/start-searchd-with-buddy –––
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
Expand Down
4 changes: 2 additions & 2 deletions test/clt-tests/buddy/test-knn-search-by-doc-id.rec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
––– block: ../base/start-searchd –––
––– block: ../base/start-searchd-with-buddy –––
––– input –––
curl -s localhost:9308/cli -d "create table test ( test_vector float_vector knn_type='hnsw' knn_dims='2' hnsw_similarity='l2' )" > /dev/null 2>&1; echo $?
––– output –––
Expand All @@ -10,4 +10,4 @@ curl -s localhost:9308/cli -d 'insert into test values ( 2, (0.2,0.3) ), ( 3, (0
––– input –––
curl -s localhost:9308/search -d '{"index":"test","knn":{"field":"test_vector","doc_id":3,"k":5}}'; echo $?
––– output –––
{"took":%{NUMBER},"timed_out":false,"hits":{"total":%{NUMBER},"total_relation":"eq","hits":[{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]+/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{1}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}}]}}0
{"took":%{NUMBER},"timed_out":false,"hits":{"total":%{NUMBER},"total_relation":"eq","hits":[{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]+/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{1}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}}]}}0
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
––– block: ../base/start-searchd –––
––– block: ../base/start-searchd-with-buddy –––
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
*************************** 1. row ***************************
Component: Daemon
Version: %{VERSION}
Version: %{VERSION}
*************************** 2. row ***************************
Component: Columnar
Version: columnar %{VERSION}
Expand All @@ -16,4 +16,4 @@ Component: KNN
Version: knn %{VERSION}
*************************** 5. row ***************************
Component: Buddy
Version: buddy %{VERSION}
Version: buddy %{VERSION}
2 changes: 1 addition & 1 deletion test/clt-tests/core/show-version-trailing-semicolon.rec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
––– block: ../base/start-searchd –––
––– block: ../base/start-searchd-with-buddy –––
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
Expand Down
12 changes: 1 addition & 11 deletions test/clt-tests/core/test-declaration-of-duplicate-attributes.rec
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,7 @@ echo '<?xml version="1.0" encoding="utf-8"?><sphinx:docset xmlns:sphinx="http://
echo -e "source min {\n type = xmlpipe2\n xmlpipe_command = cat /tmp/xml\n}\n\nindex idx {\n path = /tmp/idx\n source = min\n}" > /tmp/xml_crash.conf
––– output –––
––– input –––
indexer -c /tmp/xml_crash.conf --all
indexer -c /tmp/xml_crash.conf --all 2>&1 | grep -i 'idx'
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
using config file '/tmp/xml_crash.conf'...
indexing table 'idx'...
WARNING: duplicate attribute node <a> - using first value
ERROR: table 'idx': source 'min': attribute 'a' is added twice (line=1, pos=143, docid=0).
total 0 docs, 0 bytes
total #!/[0-9]+\.[0-9]+/!# sec, 0 bytes/sec, 0.00 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
11 changes: 1 addition & 10 deletions test/clt-tests/core/test-declaration-of-duplicate-fields.rec
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ echo '<?xml version="1.0" encoding="utf-8"?><sphinx:docset xmlns:sphinx="http://
echo -e "source min {\n type = xmlpipe2\n xmlpipe_command = cat /tmp/xml\n}\n\nindex idx {\n path = /tmp/idx\n source = min\n}" > /tmp/xml_crash.conf
––– output –––
––– input –––
indexer -c /tmp/xml_crash.conf --all
indexer -c /tmp/xml_crash.conf --all 2>&1 | grep -i 'idx'
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
using config file '/tmp/xml_crash.conf'...
indexing table 'idx'...
ERROR: table 'idx': source 'min': field 'title' is added twice (line=1, pos=136, docid=0).
total 0 docs, 0 bytes
total #!/[0-9]+\.[0-9]+/!# sec, 0 bytes/sec, 0.00 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@
sed -i '/^searchd/a\ buddy_path =' /etc/manticoresearch/manticore.conf
––– output –––
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE index2006(f text, s string); insert into index2006 values(3,'ghi','string');"
––– output –––
Expand Down Expand Up @@ -45,4 +36,4 @@ ERROR 1064 (42000) at line 1: table 'dist_table' does not support INSERT
––– input –––
mysql -h0 -P9306 -e "INSERT INTO missing_table(f, s) VALUES('abc', 'string');"
––– output –––
ERROR 1064 (42000) at line 1: table 'missing_table' absent
ERROR 1064 (42000) at line 1: table 'missing_table' absent
17 changes: 5 additions & 12 deletions test/clt-tests/core/test-external-files-handling-negative.rec
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,12 @@ wordforms = /var/lib/manticore/t_ram/wordforms_chunk0_0.txt /var/lib/manticore/t
rt_mem_limit = 268435456 |
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd; 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
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd 2>&1 | grep -i 't_ram'
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9a-zA-Z\:\.\s]+/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
precaching table 't_ram'
WARNING: table 't_ram': all wordform source tokens are stopwords (wordform='z => w', file='/var/lib/manticore/t_ram/wordforms_chunk0_0.txt'). IGNORED.
WARNING: table 't_ram': all wordform source tokens are stopwords (wordform='z => w', file='/var/lib/manticore/t_ram/wordforms_chunk0_1.txt'). IGNORED.
precached 1 tables in #!/[0-9]+\.[0-9]+/!# sec
Buddy started!
––– input –––
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 –––
Buddy started!
Loading