basho/riak_cs — pull request #964 by shino (2014-09-05 07:41:47+00:00)
Title: Bugfix: Skip invalid state manifests in GC bucket

Addresses #827 partly.

At present, the root cause why active state manifests are entered in GC bucket.
This PR does not process such manifests but just skip and log in order to
GC can proceed to other manifests instead of abort.

It's noteworthy that if `riak_cs_delete_fsm` replies ok with the same total blocks and deleted blocks
to `riak_cs_gc_worker`, then the worker attempt to delete manifest entry in `twop_set`.
Doing it *before* deleting manfiests and blocks completely poses orphan manifests/blocks.
In this PR, `riak_cs_delete_fsm` replies with total blocks = 1 and deleted_blocks = 0.

To address #827 completely, further investigation on root cause needed. Information of logs
by this PR will help.