Skip to content

Stopped tracking fate age off data in memory#4169

Merged
keith-turner merged 2 commits into
apache:elasticityfrom
keith-turner:fate-ageoff
Jan 20, 2024
Merged

Stopped tracking fate age off data in memory#4169
keith-turner merged 2 commits into
apache:elasticityfrom
keith-turner:fate-ageoff

Conversation

@keith-turner
Copy link
Copy Markdown
Contributor

These changes stop tracking fate age off data in memory which will avoid using too much memory if there are lots of fate operations. There are two commits, the first commit contains prerequisite changes to the fate storage layer that were needed to move age off tracking into persistent storage. The second commit moves age off tracking from memory to persistent storage.

@keith-turner keith-turner requested a review from cshannon January 18, 2024 14:50
Copy link
Copy Markdown
Contributor

@cshannon cshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, I like the new FateIdStatus and think that is a nice optimization to avoid reading twice.

Another nice thing is this PR also fixes #4166 and the error no longer shows up anymore in the in tests. This is fixed because the previous version with the Age off store immediately scanned in the constructor the transactions which caused the issue as described in #4166. This PR changes things so that the new FateCleaner task is scheduled with an initial delay of 10 minutes so it's a non-issue as by the time the cleaner runs for the first time the manager will be started and the RPC channel will be available.

The Accumulo store can very efficiently gather status the status at the
same time as the id for a FATE transaction.  This is already being
gathered internally in implementation of the fate storage layer.
This commit exposes this information further as it will be useful in
refactoring the ageoff store.
Replaced Fate AgeOffStore with FateCleaner. FateCleaner tracks fate
operations that are candidates for age off in the fate storage layer
instead of in memory.  Also FateCleaner does not wrap a fate storage
layer, it just takes one to track.

fixes apache#4130
@keith-turner keith-turner merged commit 045facb into apache:elasticity Jan 20, 2024
keith-turner added a commit that referenced this pull request Jan 20, 2024
The Accumulo store can very efficiently gather status the status at the
same time as the id for a FATE transaction.  This is already being
gathered internally in implementation of the fate storage layer.
This commit exposes this information further as it will be useful in
refactoring the ageoff store.
@keith-turner keith-turner deleted the fate-ageoff branch January 20, 2024 20:12
@keith-turner keith-turner linked an issue Jan 20, 2024 that may be closed by this pull request
cshannon added a commit to cshannon/accumulo that referenced this pull request Jan 26, 2024
The changes in apache#4169 moved age off tracking out of memory and into the
FATE store. The AccumuloStore has a bug where it doesn't handle the new
TxInfo enum type of TX_AGEOFF so the info is never persisted to the
store. This fixes the store so it will correctly read/write the value
and also adds a default enum case to throw an exception in the future in
case a new value is passed that is unknown so it will be caught. A test
was also added to iterate over all types to verify they all work for the
AccumuloStore so if a new info type is ever added it will validate it
in the future.
cshannon added a commit that referenced this pull request Jan 26, 2024
The changes in #4169 moved age off tracking out of memory and into the
FATE store. The AccumuloStore has a bug where it doesn't handle the new
TxInfo enum type of TX_AGEOFF so the info is never persisted to the
store. This fixes the store so it will correctly read/write the value
and also adds a default enum case to throw an exception in the future in
case a new value is passed that is unknown so it will be caught. A test
was also added to iterate over all types to verify they all work for the
AccumuloStore so if a new info type is ever added it will validate it
in the future.

Co-authored-by: Keith Turner <kturner@apache.org>
@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Make FATE age off memory efficient

3 participants