Hello everyone! I have been doing some tests, but it seems I can't make the synchronize flag work.
I have made two tests: 1) DIH with commit=false 2) DIH with commit=false + commit via Solr XML update protocol And here are the log results: For (1) the command is "/solr/dataimport?command=delta-import&commit=false&synchronous=true" and the first part of the output is: Dec 8, 2010 4:42:51 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={command=status} status=0 QTime=0 Dec 8, 2010 4:42:51 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={schema=testproject&dbHost=127.0.0.1&dbPassword=fuz10n!&dbName=fzm&commit=false&dbUser=fzm&command=delta-import&projectId=1&synchronous=true&dbPort=5432} status=0 QTime=4 Dec 8, 2010 4:42:51 PM org.apache.solr.handler.dataimport.DataImporter doDeltaImport INFO: Starting Delta Import Dec 8, 2010 4:42:51 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties INFO: Read dataimport.properties Dec 8, 2010 4:42:51 PM org.apache.solr.handler.dataimport.DocBuilder doDelta INFO: Starting delta collection. Dec 8, 2010 4:42:51 PM org.apache.solr.handler.dataimport.DocBuilder collectDelta For (2) the commands are "/solr/dataimport?command=delta-import&commit=false&synchronous=true" and "/solr/update?commit=true&waitFlush=true&waitSearcher=true" and the first part of the output is: Dec 8, 2010 4:22:50 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={command=status} status=0 QTime=0 Dec 8, 2010 4:22:50 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={schema=testproject&dbHost=127.0.0.1&dbPassword=fuz10n!&dbName=fzm&commit=false&dbUser=fzm&command=delta-import&projectId=1&synchronous=true&dbPort=5432} status=0 QTime=1 Dec 8, 2010 4:22:50 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={command=status} status=0 QTime=0 Dec 8, 2010 4:22:50 PM org.apache.solr.handler.dataimport.DataImporter doDeltaImport INFO: Starting Delta Import Dec 8, 2010 4:22:50 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties INFO: Read dataimport.properties Dec 8, 2010 4:22:50 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false) In (2) it seems like the commit is being fired before the delta-update finishes. Am I using the "synchronous" flag right? Thanks in advance! Juan M. On Mon, Dec 6, 2010 at 6:46 PM, Juan Manuel Alvarez <naici...@gmail.com> wrote: > Thanks for all the help! It is really appreciated. > > For now, I can afford the parallel requests problem, but when I put > synchronous=true in the delta import, the call still returns with > outdated items. > Examining the log, it seems that the commit operation is being > executed after the operation returns, even when I am using > commit=true. > Is it possible to also execute the commit synchronously? > > Cheers! > Juan M. > > On Mon, Dec 6, 2010 at 4:29 PM, Alexey Serba <ase...@gmail.com> wrote: >>> When you say "two parallel requests from two users to single DIH >>> request handler", what do you mean by "request handler"? >> I mean DIH. >> >>> Are you >>> refering to the HTTP request? Would that mean that if I make the >>> request from different HTTP sessions it would work? >> No. >> >> It means that when you have two users that simultaneously changed two >> objects in the UI then you have two HTTP requests to DIH to pull >> changes from the db into Solr index. If the second request comes when >> the first is not fully processed then the second request will be >> rejected. As a result your index would be outdated (w/o the latest >> update) until the next update. >> >