On Thu, Aug 9, 2012 at 5:39 PM, Bing Hua <bh...@cornell.edu> wrote:
> I'm a bit confused with the purpose of Transaction Logs (Update Logs) in
> Solr.
>
> My understanding is, update request comes in, first the new item is put in
> RAM buffer as well as T-Log. After a soft commit happens, the new item
> becomes searchable but not hard committed in stable storage. Configuring
> soft commit interval to 1 sec achieves NRT.
>
> Then what exactly T-Log is doing in this scenario?

It serves realtime-get... when even 1 second isn't acceptable (i.e.
you need to be guaranteed of getting the latest version of a
document):
http://searchhub.org/dev/2011/09/07/realtime-get/
and also allows for a peer to ask "give me the list of the last update
events you know about".
You can also "kill -9" the server and solr will automatically recover
from the log.

> what circumstances is it being cleared?

A new log file is created every time a hard commit is done, and old
log files are removed if newer log files contain enough entries to
satisfy the needs of what I call "peersync" in solr cloud (currently
~100 updates IIRC).

It's cleared after a hard commit and after there are enough entries in
other log files to satisfy the lookback requirements of what I call
"peersync" in SolrCloud (currently ~100 updates IIRC).

-Yonik
http://lucidimagination.com

Reply via email to