hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14630) Cells still show up in scan after cell-level TTL has expired
Date Fri, 16 Oct 2015 22:08:05 GMT

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

Andrew Purtell commented on HBASE-14630:

bq. My understanding was that once I set TTL on a cell, it should not come up in a scan result
after the TTL expires. 

If I understand you correctly, you stored two versions to the same location, the first without
a TTL, the second with. The timing of the original put without TTL, the update, the scan,
and compaction activity conspired to confound your expectations.

You would also need to think through corner cases if you set VERSIONS > 1 and store cells
to the same location with varying TTLs.

There is an interesting use case here for temporary overrides that automatically expire, reverting
to the prior value. 

bq. Is there another way of setting the TTL on a cell, so that it does not come up in scan
results after the TTL expires?

A simple thing to do is store all cells at a given location with a TTL applied. If you don't
need to set TTLs on a cell-by-cell basis, simply define one for a whole column family using
the "TTL" schema attribute. You do that once and then all cells stored to the column family
will have the same TTL. Prior versions will expire before later versions and the result will
be what you expect. 

> Cells still show up in scan after cell-level TTL has expired
> ------------------------------------------------------------
>                 Key: HBASE-14630
>                 URL: https://issues.apache.org/jira/browse/HBASE-14630
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.0.2, 1.1.2
>            Reporter: Emre Colak
> I have an HBase table with the following description:
=> '0', VERSIONS => '1', COMPRESSION => 'NONE', MIN_VERSIONS => '0' , TTL =>
BLOCKCACHE => 'true'}
> I put some values in it and then set TTL (30s) on those values with another
> put operation. First thing I notice is that the timestamps of the cells get
> updated after the 2nd put. And 30 seconds later, when I do a scan on the
> table, I still see those cells in the table, however this time with their
> timestamps updated to the original timestamps.
> I understand that these cells won't necessarily be deleted until a
> compaction, but they still come up in my scan even though the TTL
> that I set on them has expired.

This message was sent by Atlassian JIRA

View raw message