[ https://issues.apache.org/jira/browse/SOLR-5944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946806#comment-14946806 ]
Ishan Chattopadhyaya commented on SOLR-5944: -------------------------------------------- Here's the approach I'm talking about, in details (also for the benefit of someone who hasn't followed the previous approaches/discussions closely): 1. Make \_version\_ as a docValues field, indexed=false, stored=false [SOLR-6337]. 2. When an inplace update command (which syntactically looks like an atomic update) is received on the leader, the leader (a) applies the update on its index, (b) obtains the {{prevVersion}} as the \_version\_ of the document on which the update was applied to, (c) writes the inplace update (only the partial document) in its tlog along with a {{prevPointer}}, corresponding to the tlog entry of the document with {{prevVersion}} or -1 if such an entry doesn't exist, of the update, (d) forward the update to the other replicas, along with the prevVersion. 3. At a replica, upon receiving an inplace update, the last version (lets call it {{lastVersion}}) for the document id is obtained from the tlog/index. Now, (a) If this matches the {{prevVersion}}, then apply the update, write to tlog and return success to the leader. (b) If this doesn't match the {{prevVersion}} (case of an out of order update), wait (till a timeout) for the update with {{prevVersion}} to be written to tlog/index, possibly in other threads, and then apply the current update and return success to the leader. If a timeout has reached, but the dependent update hasn't arrived, a failure is sent back to the leader (which can then mark the replica in recovery). 4. RealTimeGet for documents that have inplace updates can be resolved by successively following a {{prevPointer}} in the tlog backwards, either to a full update in tlog or to the index. > Support updates of numeric DocValues > ------------------------------------ > > Key: SOLR-5944 > URL: https://issues.apache.org/jira/browse/SOLR-5944 > Project: Solr > Issue Type: New Feature > Reporter: Ishan Chattopadhyaya > Assignee: Shalin Shekhar Mangar > Attachments: SOLR-5944.patch, SOLR-5944.patch, SOLR-5944.patch, > SOLR-5944.patch, SOLR-5944.patch, SOLR-5944.patch, SOLR-5944.patch, > SOLR-5944.patch, SOLR-5944.patch, SOLR-5944.patch, SOLR-5944.patch, > SOLR-5944.patch > > > LUCENE-5189 introduced support for updates to numeric docvalues. It would be > really nice to have Solr support this. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org