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 release. Jon On Mon, Oct 7, 2013 at 2:39 PM, Brady Wetherington <[email protected]>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 > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > -- Jon Meredith VP, Engineering Basho Technologies, Inc. [email protected]
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
