[
https://issues.apache.org/jira/browse/PHOENIX-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Palash Chauhan updated PHOENIX-7753:
------------------------------------
Description:
Phoenix prevents creating an uncovered global secondary index on a table that
has conditional TTL defined. When attempting to create the index, Phoenix
validates that the TTL expression can be evaluated on a row from the index
table, which fails because uncovered indexes only contain key columns, not
necessarily the data columns referenced in the TTL expression.
PHOENIX-7667 introduced relaxed TTL semantics where an expired row is not
masked immediately, rather it relies on major compaction to purge the row. When
a table has relaxed conditional TTL defined, we should allow the creation of
uncovered index on it without any TTL on the index table.
Once a data table row expires and is purged by compaction, its corresponding
uncovered index row will become an orphan and will not be returned in a scan on
the uncovered index, thus achieving relaxed TTL on the index as well. Uncovered
indexes have a smaller footprint since they only store keys so there should not
be a storage bloat. These orphan index rows can be deleted either during read
repair once they are old enough or through a background index-to-data
verification process.
was:
Phoenix prevents creating an uncovered global secondary index on a table that
has conditional TTL defined. When attempting to create the index, Phoenix
validates that the TTL expression can be evaluated on a row from the index
table, which fails because uncovered indexes only contain key columns, not
necessarily the data columns referenced in the TTL expression.
PHOENIX-7667 introduced relaxed TTL semantics where an expired row is not
masked immediately, rather it relies on major compaction to purge the row. When
a table has relaxed conditional TTL defined, we should allow the creation of
uncovered index on it without any TTL on the index table.
Once a data table row expires, its corresponding uncovered index row will
become an orphan and will not be returned in a scan on the uncovered index.
Uncovered indexes have a smaller footprint since they only store keys so there
should not be a storage bloat. These orphan index rows can be deleted either
during read repair once they are old enough or through a background
index-to-data verification process.
> Allow uncovered index creation on tables with relaxed conditional TTL
> ---------------------------------------------------------------------
>
> Key: PHOENIX-7753
> URL: https://issues.apache.org/jira/browse/PHOENIX-7753
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.3.0
> Reporter: Palash Chauhan
> Assignee: Palash Chauhan
> Priority: Major
> Fix For: 5.4.0, 5.3.1
>
>
> Phoenix prevents creating an uncovered global secondary index on a table that
> has conditional TTL defined. When attempting to create the index, Phoenix
> validates that the TTL expression can be evaluated on a row from the index
> table, which fails because uncovered indexes only contain key columns, not
> necessarily the data columns referenced in the TTL expression.
> PHOENIX-7667 introduced relaxed TTL semantics where an expired row is not
> masked immediately, rather it relies on major compaction to purge the row.
> When a table has relaxed conditional TTL defined, we should allow the
> creation of uncovered index on it without any TTL on the index table.
> Once a data table row expires and is purged by compaction, its corresponding
> uncovered index row will become an orphan and will not be returned in a scan
> on the uncovered index, thus achieving relaxed TTL on the index as well.
> Uncovered indexes have a smaller footprint since they only store keys so
> there should not be a storage bloat. These orphan index rows can be deleted
> either during read repair once they are old enough or through a background
> index-to-data verification process.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)