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

Viraj Jasani commented on HBASE-26458:
--------------------------------------

Added testing details here: 
[https://github.com/apache/hbase/pull/3852#issuecomment-971465945]

To sum up,
 # TTL with negative values < {{{}-1{}}}, will stay forever regardless of any 
server side config changes.
 # TTL with positive values will be gone after TTL expires.
 # Snapshot created without specifying TTL will always have TTL value 
represented by config {{{}hbase.master.snapshot.ttl{}}}.
 # From client side, TTL values {{0}} or {{-1}} should not be provided because 
they will be treated as snapshot without TTL (same as point {{3}} above) and 
hence will represent TTL as per value represented by config 
{{{}hbase.master.snapshot.ttl{}}}.

 

I think we have doc with details of server side configs 
{{hbase.master.cleaner.snapshot.interval}} and 
{{{}hbase.master.snapshot.ttl{}}}. From client viewpoint, we should mention 
above 4 points.

Also, it's bit complex to resolve point {{4}} completely because in order to 
represent value as default TTL, we will have to either sacrifice the meaning of 
0 or -1 (if not both) in the best case. I think as long as the above mentioned 
points are taken care of, we should not see any TTL related issues.
Note: updating default value in proto message is considered as incompatible 
change. Even if we want to present only either 0 or 1 as default TTL, we will 
need changes to proto definition and be careful of the issues that could arise 
from rolling upgrade. Given the incompatibility cost, I believe we should 
rather follow the behaviour mentioned in above 4 points :(

> Value of hbase.master.snapshot.ttl is not used
> ----------------------------------------------
>
>                 Key: HBASE-26458
>                 URL: https://issues.apache.org/jira/browse/HBASE-26458
>             Project: HBase
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 1.7.1, 2.4.8
>            Reporter: Joel Swiatek
>            Assignee: Joel Swiatek
>            Priority: Minor
>             Fix For: 1.7.1, 2.4.8
>
>         Attachments: 
> branch-1-0001-HBASE-22458-Add-UNSET_SNAPSHOT_PROP-and-fix-TTL-defa.patch, 
> branch-2-0001-HBASE-22458-Add-UNSET_SNAPSHOT_PROP-and-fix-TTL-defa.patch, 
> master-0001-HBASE-22458-Add-UNSET_SNAPSHOT_PROP-and-fix-TTL-defa.patch
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> When creating a snapshot, users can explicitly specify the TTL to be used. If 
> no TTL is specified, then the SnapshotDescription is initially created with a 
> TTL of -1 to indicate FOREVER.
> When the SnapshotDescription runs through SnapshotDescriptionUtils#validate, 
> the TTL is checked to see if the default value of hbase.master.snapshot.ttl 
> should be applied. The value from the config is only applied if the TTL == 0, 
> but it should be -1.
> This has another nasty side-effect: any user who creates a snapshot and 
> explicitly sets \{TTL => 0} will find that their snapshot gets its TTL from 
> hbase.master.snapshot.TTL.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to