Bitcask fold key issue, unhandled data corruption ?

Arnaud Wetzel arnaud.wetzel at
Wed Oct 1 07:36:45 EDT 2014

Hello all,
I am using riak 1.4.3
I have an error during map reduce (not every time) :

  "phase": "listkeys",
  "error": "function_clause",
  "input": "xxx",
  "type": "error",
  "stack": "[
      [ error,

So it seems to be a corruption on a bitcask file making a <<>> bitcask
key, which is not a term_to_binary({B,K}), so the fold function crash.

I will make a manual bitcask fold in order to find the corrupted file,
but I have some questions :

- I saw that in last riak2.0 the fold function does not handle
corrupted key format either, but is their an additional consistency
check in newer version making this problem impossible ?
- What is the best way for me to reconstruct the file : delete the
partition en repair it ?
- Do you think it's a good idea to make the fold function more
resilient to a corrupted key format ?
- Do you have an idea of the possible source of the problem ? If
anybody had this issue before ?

Thank you very much


Arnaud Wetzel
Shopping Adventure
13 rue saint Anastase, 75003 Paris

More information about the riak-users mailing list