hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankit Singhal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19826) Provide a option to see rows behind a delete in a time range queries
Date Wed, 07 Feb 2018 10:12:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-19826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16355259#comment-16355259
] 

Ankit Singhal commented on HBASE-19826:
---------------------------------------

bq. So what if a compaction happens before you run the tool? The cell will be deleted in
compaction if you do not have KeepDeleteCells.TRUE, then either you use time range scan or
not you can never read it anymore...

By default, we actually cap the scan in IndexScrutinyTool to the current timestamp just in
order to avoid in-flight writes/Deletes and don't expect these in-flight writes to get compacted
during the same time. But depending on the write rate, this surely can happen.  [~jamestaylor]
, do you have any idea if we handle this case as well somewhere?

> Provide a option to see rows behind a delete in a time range queries
> --------------------------------------------------------------------
>
>                 Key: HBASE-19826
>                 URL: https://issues.apache.org/jira/browse/HBASE-19826
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>            Priority: Major
>             Fix For: 2.0.0
>
>
> We can provide an option (something like seePastDeleteMarkers) in a scan to let the user
see the versions behind the delete marker even if keepDeletedCells is set to false in the
descriptor.
> With the previous version, we workaround the same in preStoreScannerOpen hook. For reference
PHOENIX-4277
> {code}
> 	    @Override
> 	    public KeyValueScanner preStoreScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
> 	        final Store store, final Scan scan, final NavigableSet<byte[]> targetCols,
> 	        final KeyValueScanner s) throws IOException {
> 	
> 	      if (scan.isRaw() || ScanInfoUtil.isKeepDeletedCells(store.getScanInfo()) || scan.getTimeRange().getMax()
== HConstants.LATEST_TIMESTAMP || TransactionUtil.isTransactionalTimestamp(scan.getTimeRange().getMax()))
{
> 	        return s;
> 	      }
> 	
> 	      ScanInfo scanInfo = ScanInfoUtil.cloneScanInfoWithKeepDeletedCells(store.getScanInfo());
> 	      return new StoreScanner(store, scanInfo, scan, targetCols,
> 	          c.getEnvironment().getRegion().getReadpoint(scan.getIsolationLevel()));
> 	    }
> {code}
> Another way is to provide a way to set KEEP_DELETED_CELLS to true in ScanOptions of preStoreScannerOpen.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message