[
https://issues.apache.org/jira/browse/SOLR-5944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946806#comment-14946806
]
Ishan Chattopadhyaya edited comment on SOLR-5944 at 10/7/15 1:11 PM:
---------------------------------------------------------------------
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):
# Make {{\_version\_}} as a docValues field, {{indexed=false, stored=false}}
[SOLR-6337].
# When an inplace update command (which syntactically looks like an atomic
update) is received on the leader, the leader
## versions the update and applies it to its index,
## obtains the {{prevVersion}} as the {{\_version\_}} of the document on which
the update was applied to,
## 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,
## forward the update to the other replicas, along with the prevVersion.
# 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,
## If this matches the {{prevVersion}}, then apply the update, write to tlog
and return success to the leader.
## 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).
# 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.
was (Author: ichattopadhyaya):
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):
# Make {{\_version\_}} as a docValues field, {{indexed=false, stored=false}}
[SOLR-6337].
# When an inplace update command (which syntactically looks like an atomic
update) is received on the leader, the leader
## applies the update on its index,
## obtains the {{prevVersion}} as the {{\_version\_}} of the document on which
the update was applied to,
## 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,
## forward the update to the other replicas, along with the prevVersion.
# 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,
## If this matches the {{prevVersion}}, then apply the update, write to tlog
and return success to the leader.
## 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).
# 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: [email protected]
For additional commands, e-mail: [email protected]