handle integrity error

Change-Id: I62f0413753a75de7bc6889039db39549b9e35894
Reviewed-on: http://review.couchbase.org/24790
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>