【问题标题】:Sphinx returns old data after indexer --rotateSphinx 在 indexer --rotate 之后返回旧数据
【发布时间】:2014-06-20 01:19:54
【问题描述】:

我正在使用 sphinx 2.0.4 版。

每当我想重新索引数据时,我都会使用索引器

/usr/bin/indexer --config /etc/sphinxsearch/sphinx.conf XXX --rotate 

它给出输出:

root@dsphinx:~# /usr/bin/indexer --config /etc/sphinxsearch/sphinx.conf XXX --rotate 

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'XXX'...
collected 9536 docs, 55.8 MB
sorted 4.7 Mhits, 100.0% done
WARNING: 2 duplicate document id pairs found
total 9536 docs, 55758410 bytes
total 3.930 sec, 14187197 bytes/sec, 2426.34 docs/sec
total 4 reads, 0.005 sec, 2926.5 kb/call avg, 1.3 msec/call avg
total 262 writes, 0.062 sec, 311.5 kb/call avg, 0.2 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=14068).

问题是进程 14068 给出了旧的索引数据。

如果我重新加载服务 (/etc/inid.d/sphinxsearch reload),此进程 ID 会更改,并且 sphinx 返回新的索引数据。

这是一个错误还是我做的不对?

【问题讨论】:

    标签: search-engine sphinx


    【解决方案1】:

    您是如何运行查询的?

    您是否在客户端中使用任何类型的持久连接管理器?如果是这样,它可能会保持连接打开,这不会让 searchd 有机会重新启动。

    (即会延迟重启,直到所有连接都关闭)

    【讨论】:

    • 这是我的第一个想法。好吧,这不是恒定的连接,并且缓存在服务器上停留了 3 个月,并且 netstats 没有显示任何连接
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-18
    • 2018-08-23
    • 2011-02-13
    • 2020-07-05
    • 2012-01-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多