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

AMRIT SARKAR edited comment on SOLR-9530 at 2/15/17 3:41 AM:
-------------------------------------------------------------

[~noble.paul] [~ichattopadhyaya] Varun,
thank you for looking into the patch.

[~noble.paul], the patch is not thread safe as the processor is thread-specific 
and is mutually independent of other threads. This processor is somehow doing 
in-place conversion of documents (more like a plugin) and will be passed 
ultimately to DistributedUpdateProcessor (which is thread-safe), where the 
actual "atomic" update to the documents in index takes place. 

If multiple threads try to update the same document in parallel via 
AtomicUpdateProcessor, that case will be similar to multiple threads carrying 
"atomic-style" update of same document, which is already happening in our 
latest Solr. DistributedUpdateProcessor, being thread-safe, handles the 
resources well and don't let the versions conflict each other.


was (Author: sarkaramr...@gmail.com):
[~noble.paul] [~ichattopadhyaya] Varun,
thank you for looking into the patch.

[~noble.paul], the patch is not thread safe as the processor is thread-specific 
and is mutually independent of other threads. This processor is somehow doing 
in-place conversion of documents (more like a plugin) and will be passed 
ultimately to DistributedUpdateProcessor (which is thread-safe), where the 
actual "atomic" update to the documents in index takes place. 

If multiple threads try to update the same document in parallel via 
AtomicUpdateProcessor, that case will be similar to multiple threads carrying 
"atomic-style" update of same document, which is already happening in our 
latest Solr. DistributedUpdateProcessor, being thread-safe, handles the 
resources well and don't let the versions conflict each other.

Let me know if I am missing out anything in this regard.

> Add an Atomic Update Processor 
> -------------------------------
>
>                 Key: SOLR-9530
>                 URL: https://issues.apache.org/jira/browse/SOLR-9530
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>         Attachments: SOLR-9530.patch
>
>
> I'd like to explore the idea of adding a new update processor to help ingest 
> partial updates.
> Example use-case - There are two datasets with a common id field. How can I 
> merge both of them at index time?
> Proposed Solution: 
> {code}
> <updateRequestProcessorChain name="atomic">
>   <processor class="solr.processor.AtomicUpdateProcessorFactory">
>     <str name="my_new_field">add</str>
>   </processor>
>   <processor class="solr.LogUpdateProcessorFactory" />
>   <processor class="solr.RunUpdateProcessorFactory" />
> </updateRequestProcessorChain>
> {code}
> So the first JSON dump could be ingested against 
> {{http://localhost:8983/solr/gettingstarted/update/json}}
> And then the second JSON could be ingested against
> {{http://localhost:8983/solr/gettingstarted/update/json?processor=atomic}}
> The Atomic Update Processor could support all the atomic update operations 
> currently supported.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to