Open githubmanticore opened 11 months ago
➤ sanikolaev commented:
As discussed on today's dev call here's what we can do:
Check if we can react on HUP differently in this case, so the user doesn't have to do RELOAD INDEXES
and just indexer --rotate
is enough
If we can't, show WARNING: Please run 'RELOAD TABLES' to make the new table(s) visible
➤ PavelShilin89 commented:
Indeed, RELOAD TABLES helped solve the problem. The problem was that I was running searchd and indexer in the wrong order.
Comments from @klirichek :
On startup daemon loads the config. In case of she-bang, it starts the script once and collects output. Daemon memorize CRC32, size, creation and modification time.
Later, on HUP signal daemon reloads the config (and re-run it in case of she-bang). Then it compares CRC32, size, creation and modification time with memorized values, and in case config wasn't changed - nothing happens.
m.b. implement 'indexer --reload' - as arbitrary way to just send a 'hup' signal (that is - read pidfile and send signal).
M.b. arbitrary send 'hup' even without '--rotate'. This way daemon will automatically pick up new tables when they're born.
From the doc: 'New tables can be loaded by rotation; however, the regular handling of the HUP signal is to check for new tables only if the configuration has changed since server startup. If the table was already defined in the configuration, the table should be first created by running indexer without rotation and perform the RELOAD TABLES statement instead.'
Changes: indexer can be run with or without rotation, it doesn't matter. In first case it creates 'base set of files' and do nothing. In second, it creates 'new set of files' and send HUP. Anyway, daemon first check if config is the same.
You can also run touch
config file now. touch manticore.conf && kill -hup $(pgrep searchd)
.
https://gitlab.com/manticoresearch/dev/-/issues/756
origin:
- --rotate reloads config, adds new indexes and drops old ones
git-svn-id: svn://svn.sphinxsearch.com/sphinx/trunk@1235 406a0c4d-033a-0410-8de8-e80135713968
022d05c0 glook <glook@406a0c4d-033a-0410-8de8-e80135713968> on 31.03.2008 at 08:54
Steps to reproduce:
Create an idx folder, use the command
mkdir idx
We run the Manticore search daemon process with your configuration file using the command:
searchd --config ./manticore.conf
. Searchd starts but doesn't detect the indexes.We run the indexer, it works, but since searchd initially didn't see the indexes, it still doesn't see them now, even though the physical index files are being created.
We run the searchd, use
searchd --config ./manticore.conf --stop
We run the searchd. Everything works correctly.
Expected result:
Start the searchd. Everything works correctly.
We run the indexer. It starts correctly.
The indexer is functioning, but it doesn't detect the indexes, even though the physical index files are being created.
Logs: