[ 
https://issues.apache.org/jira/browse/SOLR-10691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011353#comment-16011353
 ] 

Erick Erickson commented on SOLR-10691:
---------------------------------------

Could you explain your use-case for this functionality? On the surface, it 
seems very trappy. With any kind of autocommit happening, you really don't have 
a good way to know what docs are already committed. In SolrCloud there's no 
guarantee that docs that have been committed on one replica are also committed 
on another. Not to mention transaction logs, so just not calling commit has to 
deal with rolling back the tlogs as well or the docs will be re-indexed when 
the node starts up.

99.9% of the time, configuring this would cause unexpected behavior. SolrCloud 
in particular tries very hard to guarantee that any doc sent to SolrCloud is 
there when the system restarts for whatever reason. If implemented such that 
documents were lost, this kind of change would cause that contract to be 
voilated.

This seems like it's too little benefit for too much risk unless there's a 
compelling use-case, other than "it'd be a little more efficient".

Plus, the tests do not verify the commit _behavior_, just that the config was 
properly read. My claim is that if there were tests adding a bunch of docs such 
that the commits happened at unpredictable intervals, say with some kind of 
commitWithin some random number between 250 and 1,000 ms it would be difficult 
to write a reliable test showing that predictable docs were thrown away.

Or am I completely misunderstanding the point?

> Allow to not commit index on core close
> ---------------------------------------
>
>                 Key: SOLR-10691
>                 URL: https://issues.apache.org/jira/browse/SOLR-10691
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ivan Mamontov
>            Priority: Trivial
>         Attachments: SOLR-10691.patch
>
>
> As a Solr user I would like to avoid unnecessary commits into Solr/Lucene 
> index on {{org.apache.solr.update.SolrIndexWriter#close}} in case IW has 
> uncommitted changes.
> In {{org.apache.lucene.index.IndexWriterConfig}}(LUCENE-5871) there is a 
> property which is currently used to decide whether to commit or discard 
> uncommitted changes  when you call close(). Unfortunately Solr does not 
> support this property in {{org.apache.solr.update.SolrIndexConfig}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to