[
https://issues.apache.org/jira/browse/SOLR-10734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16416180#comment-16416180
]
Shalin Shekhar Mangar commented on SOLR-10734:
----------------------------------------------
Attached: SOLR-10734-fix2.patch
There were two separate bugs here, one rare and the other more common:
# Common: By the time a version conflict is reported, the SolrInputDocument
inside the AddUpdateCommand is already modified to be a full document i.e. it
has no atomic update command anymore. So when we try to update the same
AddUpdateCommand with the new version, it ends up overwriting the older
document in the index. The fix was to keep a reference to the atomic updates
and re-apply them on a version conflict.
# Rare: The processor sets the version on the document only if a version is
returned by VersionInfo,lookupVersion. Since the default version is 0 i.e. no
constraints, two different updates can race and get a null version thereby
overwriting each other. The fix is to set version to -1 if
VersionInfo,lookupVersion returns null.
I beasted this test 100 times and it passes consistently where as earlier it
used to fail 1/5 times with the right seed.
> Multithreaded test/support for AtomicURP broken
> -----------------------------------------------
>
> Key: SOLR-10734
> URL: https://issues.apache.org/jira/browse/SOLR-10734
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Ishan Chattopadhyaya
> Assignee: Shalin Shekhar Mangar
> Priority: Major
> Fix For: 7.3, master (8.0)
>
> Attachments: SOLR-10734-fix2.patch, SOLR-10734.patch,
> SOLR-10734.patch, SOLR-10734.patch, SOLR-10734.patch, Screen Shot 2017-05-31
> at 4.50.23 PM.png, log-snippet, testMaster_2500, testResults7_10,
> testResultsMaster_10
>
>
> The multithreaded test doesn't actually start the threads, but only invokes
> the run directly. The join afterwards doesn't do anything, hence.
> {code}
> diff --git
> a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdateProcessorFactoryTest.java
>
> b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdateProcessorFactoryTest.java
> index f3f833d..10b7770 100644
> ---
> a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdateProcessorFactoryTest.java
> +++
> b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdateProcessorFactoryTest.java
> @@ -238,7 +238,7 @@ public class AtomicUpdateProcessorFactoryTest extends
> SolrTestCaseJ4 {
> }
> }
> };
> - t.run();
> + t.run(); // red flag, shouldn't this be t.start?
> threads.add(t);
> finalCount += index; //int_i
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]