Siyao Meng created HDDS-17705:
---------------------------------
Summary: Recon stops the OM metadata manager before the OM DB sync
scheduler has terminated
Key: HDDS-17705
URL: https://issues.apache.org/jira/browse/HDDS-17705
Project: Apache Ozone
Issue Type: Bug
Components: Ozone Recon
Reporter: Siyao Meng
{{OzoneManagerServiceProviderImpl.stop()}} stops the Recon OM metadata manager
before the OM DB sync scheduler:
{code:java}
reconTaskController.stop();
omMetadataManager.stop();
scheduler.shutdownNow();
{code}
{{shutdownNow()}} only interrupts the sync thread and does not wait for it. A
full snapshot or delta sync that is running while Recon stops can therefore
keep using the OM DB store after {{omMetadataManager.stop()}} closed it, or
call {{updateOmDB}} after the stop and open a new store and table caches that
are never closed. {{OmMetadataManagerImpl.stop()}} also iterates
{{tableCacheMetricsMap}} (and, with HDDS-17460, {{tableMap}}), plain
{{HashMap}}s that {{updateOmDB}} replaces entries in from the sync thread, so
the stop can fail with {{ConcurrentModificationException}}.
This only affects Recon shutdown while a sync is in progress.
Proposed fix: in {{stop()}}, call the existing {{stopSyncDataFromOMThread()}}
(shutdown, then await termination) before stopping the task controller and the
metadata manager.
Found in review of https://github.com/apache/ozone/pull/11894.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]