You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Shushant Arora <sh...@gmail.com> on 2016/05/16 23:55:02 UTC

hbase get and mvcc

Hi

Hbase uses MVCC for achieving consistent result for Get operations .
To achieve MVCC it has to maintain multiple versions of same row/cells .
How many max version of a row/cell does Hbase keeps at any time to support
MVCC.

Since say multiple gets started one after the other and has not completed
yet and multiple puts are also occuring in between . Thus it maintains all
versions whose read point is still in use ?

Thanks!

Re: hbase get and mvcc

Posted by Stack <st...@duboce.net>.
On Mon, May 16, 2016 at 5:19 PM, Shushant Arora <sh...@gmail.com>
wrote:

> thanks!
>
> Does puts which fall inside readpoint of ongoing scan/get are preserved in
> HFile also or only in memstore and it blocks memstore flush until all
> ongoing scans are completed.
>
>
>
Yes.

If a flush happens while an outstanding Scan, the Put sequenceid -- the
sequenceid is a unique monotonically increasing id that is given to each
edit; this sequence id is assigned per region; this sequenceid is what mvcc
deals in -- makes it out to the hfile and is factored in when reads happen
to include the just-flushed hfile.

St.Ack




>
> On Tue, May 17, 2016 at 5:31 AM, Stack <st...@duboce.net> wrote:
>
> > On Mon, May 16, 2016 at 4:55 PM, Shushant Arora <
> shushantarora09@gmail.com
> > >
> > wrote:
> >
> > > Hi
> > >
> > > Hbase uses MVCC for achieving consistent result for Get operations .
> > > To achieve MVCC it has to maintain multiple versions of same row/cells
> .
> > > How many max version of a row/cell does Hbase keeps at any time to
> > support
> > > MVCC.
> > >
> > > Since say multiple gets started one after the other and has not
> completed
> > > yet and multiple puts are also occuring in between . Thus it maintains
> > all
> > > versions whose read point is still in use ?
> > >
> > >
> > Yes.
> >
> > All ongoing Gets/Scans are registered on startup with their current
> > readpoint (see HRegion; see constructor for HRegionScannerImpl). Any Put
> > that falls inside the readpoint of currently ongoing Gets/Scans will be
> > preserved while the Get/Scan is ongoing.
> >
> > St.Ack
> >
> >
> >
> > > Thanks!
> > >
> >
>

Re: hbase get and mvcc

Posted by Shushant Arora <sh...@gmail.com>.
thanks!

Does puts which fall inside readpoint of ongoing scan/get are preserved in
HFile also or only in memstore and it blocks memstore flush until all
ongoing scans are completed.



On Tue, May 17, 2016 at 5:31 AM, Stack <st...@duboce.net> wrote:

> On Mon, May 16, 2016 at 4:55 PM, Shushant Arora <shushantarora09@gmail.com
> >
> wrote:
>
> > Hi
> >
> > Hbase uses MVCC for achieving consistent result for Get operations .
> > To achieve MVCC it has to maintain multiple versions of same row/cells .
> > How many max version of a row/cell does Hbase keeps at any time to
> support
> > MVCC.
> >
> > Since say multiple gets started one after the other and has not completed
> > yet and multiple puts are also occuring in between . Thus it maintains
> all
> > versions whose read point is still in use ?
> >
> >
> Yes.
>
> All ongoing Gets/Scans are registered on startup with their current
> readpoint (see HRegion; see constructor for HRegionScannerImpl). Any Put
> that falls inside the readpoint of currently ongoing Gets/Scans will be
> preserved while the Get/Scan is ongoing.
>
> St.Ack
>
>
>
> > Thanks!
> >
>

Re: hbase get and mvcc

Posted by Stack <st...@duboce.net>.
On Mon, May 16, 2016 at 4:55 PM, Shushant Arora <sh...@gmail.com>
wrote:

> Hi
>
> Hbase uses MVCC for achieving consistent result for Get operations .
> To achieve MVCC it has to maintain multiple versions of same row/cells .
> How many max version of a row/cell does Hbase keeps at any time to support
> MVCC.
>
> Since say multiple gets started one after the other and has not completed
> yet and multiple puts are also occuring in between . Thus it maintains all
> versions whose read point is still in use ?
>
>
Yes.

All ongoing Gets/Scans are registered on startup with their current
readpoint (see HRegion; see constructor for HRegionScannerImpl). Any Put
that falls inside the readpoint of currently ongoing Gets/Scans will be
preserved while the Get/Scan is ongoing.

St.Ack



> Thanks!
>