in hbase0.98.10, doPut is as follows:
private void doPut(Put put) throws InterruptedIOException,
RetriesExhaustedWithDetailsException {
if (ap.hasError()){
writeAsyncBuffer.add(put);
backgroundFlushCommits(true);
}
validatePut(put);
currentWriteBufferSize += put.heapSize();
writeAsyncBuffer.add(put);
while (currentWriteBufferSize > writeBufferSize) {
backgroundFlushCommits(false);
}
}
i have two suggesstions:
1. if ap has error, then this put will be added to buffer twice and flush
twice, why?
2. if really need to flush twice, then we should validate, increament buffer
size, finally add this put to buffer.
[email protected]