Skip to content

HDDS-16643. Remove CleanupTableInfo mechanism - #11365

Open
ivandika3 wants to merge 5 commits into
apache:masterfrom
ivandika3:HDDS-16643
Open

ivandika3 wants to merge 5 commits into
apache:masterfrom
ivandika3:HDDS-16643

Conversation

@ivandika3

@ivandika3 ivandika3 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

We have supported automatic cache tracking and cleanup in HDDS-13365, but keep using CleanupTableInfo for safe guards. If HDDS-13365 works well, we can remove the CleanupTableInfo entirely.

Note this also adds a TableCacheUpdateTracker.recordCacheUpdate(S3_SECRET_TABLE) since S3_SECRET_TABLE has a separate cache mechanisms than the normal OM table cache.

This would remove one footgun from OM development (hopefully without introducing another one).

Generated by: GPT 5.6.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16643

How was this patch tested?

CI (Clean CI: https://github.com/ivandika3/ozone/actions/runs/36673297490).

@ivandika3 ivandika3 self-assigned this Sep 30, 2026
@github-actions github-actions Bot added the om label Sep 30, 2026
@ivandika3
ivandika3 marked this pull request as ready for review September 30, 2026 07:32
@peterxcli
peterxcli self-requested a review September 30, 2026 08:51
@ivandika3
ivandika3 requested a review from szetszwo October 1, 2026 05:55

@szetszwo szetszwo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ivandika3 , thanks for working on this! Just have a question and a very minor comment.

@@ -71,7 +65,6 @@ public OMDirectoryCreateResponseWithFSO(@Nonnull OMResponse omResponse,
public OMDirectoryCreateResponseWithFSO(@Nonnull OMResponse omResponse,
@Nonnull Result result) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's remove the result parameter. (If no further change is needed, let's just merge this PR and fix this later.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated since there is also another review to address.

if (cache != null) {
LOG.info("Updating cache for accessId/user: {}.", accessId);
cache.put(accessId, secret);
TableCacheUpdateTracker.recordCacheUpdate(S3_SECRET_TABLE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: why track it here?

@ivandika3 ivandika3 Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The S3SecretManager uses table cache, but the implementation does not use the unified TypedTable, probably because it supports both external S3 secret store (i.e. VaultSecretStore) and embedded (OM RocksDB), but Ozone table mechanisms only support RocksDB (TypedTable uses RDBTable as the underlying store).

There is also cache related cleanup logic in OzoneManagerDoubleBuffer just for S3_SECRET_TABLE which I think it kind of hacky since the whole cache evictions has already been supported by the OM TableCache. Technically, it should be possible to unify it by making the S3SecretCache to be a TableCache, but this means that we might need to make OM to generalize the table cache and store implementation API (where the store can support other remote store like VaultStore or even things like remote KV store which means that OM only stores in-memory cache similar to QiHoo OM architecture, see https://github.com/apache/ozone/files/13347053/OM.-Qihoo.pdf), which is going to be quite involved.

@rich7420

rich7420 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@ivandika3 thanks for the patch! overall lg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants