Truncated bit-cask files

Magnus Kessler mkessler at basho.com
Tue Feb 14 04:48:36 EST 2017


On 13 February 2017 at 19:56, Arun Rajagopalan <arun.v.rajagopalan at gmail.com
> wrote:

> Hello Riak Users
>
> We have situations where we dont or cant gracefully stop riak. When that
> happens we occasionally get a truncated last-record in bitcask files
>
> If I delete those bitcask dir and the anti_entropy directory, Riak
> rebuilds those bitcask files correctly
>
> Is there a way to rectify those borken bitcask files ?
>
> Thanks
> Arun
>
>
>
Hi Arun,

There should be no need to remove truncated bitcask files. Any objects up
to the point of truncation should still be available to Riak. However, it
may take longer for the affected partition to start up, as the
corresponding hint file will not match the data file, and Riak will scan
the latter to populate the key set it keeps in memory.

By removing anti_entropy files you are forcing the AAE trees to be rebuilt.
Once this has completed, AAE will fill back any objects missing due to the
truncated bitcask files. You can also force a full partition repair by
following the instructions from the documentation [0].

Can you let me know why you cannot shut down the node gracefully? Unclean
shutdowns should be a last resort and not part of normal operating
procedures.

Kind Regards,

Magnus


[0]:
http://docs.basho.com/riak/kv/2.2.0/using/repair-recovery/repairs/#repairing-partitions
.

-- 
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20170214/281edc6b/attachment-0002.html>


More information about the riak-users mailing list