[
https://issues.apache.org/jira/browse/HBASE-3498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989478#comment-12989478
]
ryan rawson commented on HBASE-3498:
------------------------------------
I came up with 2 solutions to this problem:
Create Sentential KV.firstOnRow and KV.lastOnRow values that the memstore
scanner can 'hang out' at between rows. They will ensure that edits will end up
before the scanner iterator point. It might seem only the lastOnRow is
required, but the firstOnRow is also required because without it after a reseek
we will end up pointing to the 'first' real KV of a row, thus causing a problem
when someone else inserts more KVs before us.
Another solution is to change our data structure to be more like:
CSLM<byte[],SortedSet<KeyValue>>
The memstore scanner would know when it got to the 'end' of a row, and return a
sentinel value to the StoreScanner, then it would allow the next next() call to
push us into the next row, and only iterate there WHEN we need to, thus never
'missing' a row. Also we could control the iteration to ensure we dont actually
start "in" to the next row until we really need to. We might be able to use a
different kind of data structure for the SortedSet, giving us benefits there.
> Memstore scanner needs new semantics, which may require new data structure
> --------------------------------------------------------------------------
>
> Key: HBASE-3498
> URL: https://issues.apache.org/jira/browse/HBASE-3498
> Project: HBase
> Issue Type: Sub-task
> Reporter: ryan rawson
> Assignee: ryan rawson
> Fix For: 0.92.0
>
>
> We may need a new memstore datastructure. Much has been written about the
> concurrency and speed and cpu usage, but there are new things that were
> brought to light with HBASE-2856.
> Specifically we need a memstore scanner that serves up to the moment reads,
> with a row-level completeness. Specifically after a memstore scanner goes
> past the end of a row, it should return some kind of 'end of row' token which
> the StoreScanner should trigger on to know it's at the end of the row. The
> next call to memstore scanner.next() should return the _very next available
> row from the start of that row_ at _the time it's requested_.
> It should specifically NOT:
> - return everything but the first column
> - skip a row that was inserted _after_ the previous next() was completed
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira