2i Index Durability/Resilience

Jon Meredith jmeredith at basho.com
Mon Oct 7 17:46:34 EDT 2013

Hi Brady,

The 2I indices are written in the same store as the main objects whenever
the main object is updated.  If a primary node is down, the indices will be
written to a fallback node.  When the fallback sees the primary come back
online and stops receiving requests for that partition it will send the
main object back to the primary and that will re-index it.

The docs could benefit with a little clarification.  Secondary indices do
benefit from read repair, that is if the main object is spotted as being
out of date or missing during a get, it is rewritten with the up to date
information on all nodes.  The anti-entropy mechanism that we are currently
missing is spotting corruption within leveldb itself.  For example if part
of a the leveldb database storing a vnode is corrupted so that the .sst
files containing the index entries were destroyed there is no mechanism to
spot and repair that.  We are intending to add that for the next major


On Mon, Oct 7, 2013 at 2:39 PM, Brady Wetherington <brady at bespincorp.com>wrote:

> What happens to your 2i indexes if you do a write and one of the nodes
> you're trying to write to is down?
> http://docs.basho.com/riak/latest/dev/using/2i/ says:
>    - When you want or need anti-entropy. Since 2i is just metadata on the
>    KV object and the indexes reside on the same node, 2i piggybacks off of
>    read-repair.
> But
> http://docs.basho.com/riak/latest/ops/running/recovery/repairing-indexes/says:
> Riak Secondary indexes (2i) currently have no form of anti-entropy (such
> as read-repair). Furthermore, for performance and load balancing reasons,
> 2i reads from 1 random node. This means that when a replica loss has
> occurred, inconsistent results may be returned.
> I am building a solution around 2i - so I just wanted to know if there was
> any way to clarify these points - how resilient are these indexes? Under
> what circumstances will they stop working (or return inconsistent results)?
> -B.
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Jon Meredith
VP, Engineering
Basho Technologies, Inc.
jmeredith at basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20131007/4b54ecc0/attachment.html>

More information about the riak-users mailing list