Siyao Meng created HDDS-17655:
---------------------------------
Summary: Prevent FULL_CACHE tables in snapshot and checkpoint DBs
Key: HDDS-17655
URL: https://issues.apache.org/jira/browse/HDDS-17655
Project: Apache Ozone
Issue Type: Improvement
Components: Snapshot, OM
Reporter: Siyao Meng
Snapshot DBs and OM DB checkpoints are opened through
{{OmMetadataManagerImpl#initializeOmTables}} with {{CacheType.PARTIAL_CACHE}}.
If a table ignores that argument and uses {{FULL_CACHE}}, every open loads the
whole table and starts a {{FullTableCache}} cleanup thread that is never shut
down (HDDS-17460), so the OM leaks one thread per snapshot DB open.
HDDS-14091 did exactly this for {{s3RevokedStsTokenTable}}. Master is not
affected, because the STS branch merge f7c62ae2329 changed that line to
{{cacheType}}, but nothing prevents it from happening again. Branches that
picked up HDDS-14091 without that merge leaked about 170K threads per OM in a
snapshot scale test.
Proposal:
* Make {{OmMetadataManagerImpl.TableInitializer}} reject a {{FULL_CACHE}} table
in a DB opened with {{PARTIAL_CACHE}}, so the mistake fails on the first
snapshot DB open in any test.
* Add a unit test that repeatedly opens and closes a snapshot DB and a
checkpoint DB and checks that no thread is left behind.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]