Optimistic Locking with Riak Search / is _version_ required in schema.xml?

David James davidcjames at gmail.com
Fri Aug 8 16:00:58 EDT 2014


Thanks for the detailed answers!


On Thu, Aug 7, 2014 at 5:57 PM, Ryan Zezeski <ryan at zinascii.com> wrote:

>
> On Aug 7, 2014, at 5:46 PM, David James <davidcjames at gmail.com> wrote:
>
>
>    - Is _version_ required?
>
>
> It should not be required as the documentation says it is only needed for
> real-time GET which Riak Search (Yokozuna) disables since Riak KV provides
> the get/put implementation.
>
>
>    - I see SolrCloud mentioned in some documentation (see below)? Does
>    Riak Search use it?
>
>
> RS does not make use of SolrCloud at all.  It uses Solr’s Distributed
> Search but that is something that existed well before SolrCloud.  All
> routing and replica administration is handled by Riak.  Each Solr instance
> (one per node) has no awareness of the other nodes except for the explicit
> distributed queries sent by Riak.
>
>
>    - How does Riak Search handle optimistic locking?
>
>
> It doesn’t use Solr’s optimistic locking at all.  All key-value semantics
> come from Riak itself.  RS simply indexes an object’s values.
>
>
>
> See this comment on the default_schema.xml on Github:
>
> <!-- TODO: is this needed? -->
> <field name="_version_" type="long" indexed="true" stored="true"/>
>
>
> https://raw.githubusercontent.com/basho/yokozuna/develop/priv/default_schema.xml
>
>
> Yes, I wrote that TODO.  It is one of many that founds its way into 2.0.0
> :).  You should run fine without this field if you create a custom schema.
>
>
>
> P.S. Per https://wiki.apache.org/solr/SchemaXml
>
>    - _version_ [image: <!>] Solr4.0 <https://wiki.apache.org/solr/Solr4.0> -
>    This field is used for optimistic locking in SolrCloud
>    <http://wiki.apache.org/solr/SolrCloud> and it enables Real Time Get
>    <http://wiki.apache.org/solr/RealTimeGet>. If you remove it you must
>    also remove the transaction logging from solrconfig.xml, see Real Time
>    Get <http://wiki.apache.org/solr/RealTimeGet>.
>
>
> Just to reiterate what I said above, RS disables the transaction logging
> and thus there is no real time get.  There is no reason for it since that
> is what Riak itself provides.
>
> -Z
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140808/919e5554/attachment.html>


More information about the riak-users mailing list