[ 
https://issues.apache.org/jira/browse/HBASE-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Hofhansl updated HBASE-4241:
---------------------------------

    Attachment: 4241.txt

Here's a sketch for a patch.
Basically the KVs of the memstore's snapshot are wrapped in a scanner and then 
passed for a new StoreScanner.
So we use the same logic as in compactions here, which is good.
The reasoning why this is correct goes as follows:
If maxVersion=N and we find more than N versions in the memstore we safely 
avoid writing all further versions.
Same for minVersions, if minversions=N and we find at least N versions in the 
memstore we can avoid writing all further expired versions.

> Optimize flushing of the Store cache for max versions and (new) min versions
> ----------------------------------------------------------------------------
>
>                 Key: HBASE-4241
>                 URL: https://issues.apache.org/jira/browse/HBASE-4241
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver
>    Affects Versions: 0.92.0
>            Reporter: Lars Hofhansl
>            Priority: Minor
>         Attachments: 4241.txt
>
>
> As discussed with with Jon, there is room for improvement in how the memstore 
> is flushed to disk.
> Currently only expired KVs are pruned before flushing, but we can also prune 
> versions if we find at least maxVersions versions in the memstore.
> The same holds for the new minversion feature: If we find at least minVersion 
> versions in the store we can remove all further versions that are expired.
> Generally we should use the same mechanism here that is used for Compaction. 
> I.e. StoreScanner. We only need to add a scanner to Memstore that can scan 
> along the current snapshot.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to