You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by "zhtao01@163.com" <zh...@163.com> on 2021/12/14 12:13:52 UTC

Rollback or transation in SolrJ

Hi,
    We want to use rollback in SolrJ while autoSoftCommit and autoCommit are open ,and we expect it works like a transaction in databases,but we found all non-committed documents are rolled back after SolrClient#rollback called.Although the rolled back documents can not be searched after rollback ,after another document is added,they can be retrieved again.
    
   Does solr supports transations like databases?



Many thanks,
Tony

Re: Rollback or transation in SolrJ

Posted by Walter Underwood <wu...@wunderwood.org>.
Rollback is not implemented for Solr Cloud clusters. We were using it for our master/slave clusters, but had to rewrite to use a different approach when we moved to Solr Cloud.

No, Solr does not have transactions. The rollback just cancels all submitted updates (from any client) that have not been committed.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Dec 14, 2021, at 4:13 AM, zhtao01@163.com wrote:
> 
> Hi,
>    We want to use rollback in SolrJ while autoSoftCommit and autoCommit are open ,and we expect it works like a transaction in databases,but we found all non-committed documents are rolled back after SolrClient#rollback called.Although the rolled back documents can not be searched after rollback ,after another document is added,they can be retrieved again.
> 
>   Does solr supports transations like databases?
> 
> 
> 
> Many thanks,
> Tony