Hi Wade,

The goal of minibatches is to coalesce multiple puts into a single WAL edit.
Each WAL edit involves syncing the edit log, which is expensive. So,
batching allows us to do fewer syncs.

The reason that we stop a batch if we fail to lock a row is to avoid
deadlocks.

The code could probably be improved to try to lock as many as possible and
then go back to try to lock any it missed in a second pass. Right now, it
goes sequentially, I believe.

-Todd

On Thu, May 5, 2011 at 3:19 AM, 肖之慰 <[email protected]> wrote:

> hi all,
>
> When I read the doMiniBatchPut function in HBase-0.90.1, I find that
> it would first acquire as many row locks as it can before performing
> updates. If one row is not accessible, all following rows will not be
> updated for this batch. So why not update one row at a time so that
> every row can be processed?
>
> Thank you.
> ---
> Wade
>



-- 
Todd Lipcon
Software Engineer, Cloudera

Reply via email to