devmadhuu opened a new pull request, #9067:
URL: https://github.com/apache/ozone/pull/9067
## What changes were proposed in this pull request?
This PR change is to address the issue where during initialization of OM
tables after creation of new rocksDb, there is a register of metrics logic for
all OM tables, and code is not checking if metrics already registered, so that
unregister it first and then register.
If table metrics are already registered, and we try to register again, it
will throw error:
```
org.apache.hadoop.metrics2.MetricsException: Metrics source userTableCache
already exists!
49902 at
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:152)
49903 at
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:125)
49904 at
org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:229)
49905 at
org.apache.hadoop.hdds.utils.TableCacheMetrics.create(TableCacheMetrics.java:48)
49906 at
org.apache.hadoop.hdds.utils.db.TypedTable.createCacheMetrics(TypedTable.java:441)
49907 at
org.apache.hadoop.ozone.om.OmMetadataManagerImpl$TableInitializer.get(OmMetadataManagerImpl.java:1857)
49908 at
org.apache.hadoop.ozone.om.OmMetadataManagerImpl$TableInitializer.get(OmMetadataManagerImpl.java:1840)
49909 at
org.apache.hadoop.ozone.om.OmMetadataManagerImpl.initializeOmTables(OmMetadataManagerImpl.java:424)
49910 at
org.apache.hadoop.ozone.recon.recovery.ReconOmMetadataManagerImpl.initializeNewRdbStore(ReconOmMetadataManagerImpl.java:131)
49911 at
org.apache.hadoop.ozone.recon.recovery.ReconOmMetadataManagerImpl.updateOmDB(ReconOmMetadataManagerImpl.java:154)
49912 at
org.apache.hadoop.ozone.recon.spi.impl.OzoneManagerServiceProviderImpl.updateReconOmDBWithNewSnapshot(OzoneManagerServiceProviderImpl.java:516)
49913 at
org.apache.hadoop.ozone.recon.spi.impl.OzoneManagerServiceProviderImpl.executeFullSnapshot(OzoneManagerServiceProviderImpl.java:800)
49914 at
org.apache.hadoop.ozone.recon.spi.impl.OzoneManagerServiceProviderImpl.syncDataFromOM(OzoneManagerServiceProviderImpl.java:752)
49915 at
org.apache.hadoop.ozone.recon.spi.impl.OzoneManagerServiceProviderImpl.lambda$startSyncDataFromOM$2(OzoneManagerServiceProviderImpl.java:332)
49916 at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
49917 at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
49918 at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
49919 at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
49920 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
49921 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
49922 at java.lang.Thread.run(Thread.java:748)
```
and above forces rocksDB to close and shutdown.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13710
## How was this patch tested?
Tested using existing Junit and docker tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]