MB-20247: Check callback return value for failure
The batchWarmupCallback applies many items to the vbucket yet
is not coded to handle failures, e.g. ENOMEM.
These errors are now checked for and the warmup stops when an error
is found.
Testing of this is difficult as it was always quite theoretical:
1. The real failure case here is very hard to hit, I think if you
warmup close to DGM whilst racing deletes/evict from the frontend
you could encounter this situation.
2. warmup has very little unit-testing that can be adapted.
However I've built an instrumented ep-engine that would force the
error condition after n callbacks and I've ran that version under
valgrind and ASAN.
Change-Id: I05d35e10e577a3b5c2c7d21807996ab7b8455cc1
Reviewed-on: http://review.couchbase.org/68937
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>