apache / apache/hudi

Add support for infinite retention of data files with archival enabled

Open
#15,216 0 comments 0 reactions 0 assignees View on GitHub
area:table-service component:archiving from-jira priority:critical type:improvement
Dominant language
Java
Stars
6.2k
Forks
2.5k
Avg merge
2d 8h
Merged PRs (30d)
111

Description

We can support infinite retention with hudi (with archival enabled), it would be a pretty good use-case for those who may want to query hudi table for any time in the past. 

 

How to achieve: 

- Disable cleaner completely.

- Enable archival as usual. 

- Enable metadata table and so file listing can scale well. 

Let users query hudi with "as.of.timestamp" with any timestamp in the past. 

 

With this, we can let users to retain all data for 1 year or even more and still query for any snapshot in the past. Obviously this comes with the additional storage cost, but if users are willing to bear the cost, we should be able to support them. 

 

Disabling cleaner : 

  option("hoodie.clean.automatic","false").
  option("hoodie.clean.async","true").

 

Things to fix:

Replaced file groups, once removed the archiver, could become active file groups. For eg, if clustering replaced FG_1 and FG2, HoodieTableFileSystemView will load all file groups and then will filter out replaced file groups. FG_1 and FG_2 will be deduced as replaced if it finds a replace commit pertaining to commits for FG_1 and FG_2 in active timeline. 

In regular flow, cleaner will clean those file groups and the timeline files may not matter after that. but here, since cleaner is completely disabled, we need to fix this. 

 

 

 

 

 

 

 

 

## JIRA info

- Link: https://issues.apache.org/jira/browse/HUDI-4216
- Type: Improvement

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with HoodieTableFileSystemView and the active timeline handling described in the issue, then trace how archival and disabled cleaner settings affect file-group discovery. Verify behavior with metadata table enabled and as.of.timestamp queries across older snapshots. Done means replaced file groups are not treated as active while historical snapshots remain queryable without automatic cleaning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.