You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2024/01/01 21:38:00 UTC

[jira] [Created] (HDDS-10041) Do not start the daemon inside the OzoneManagerDoubleBuffer constructor

Tsz-wo Sze created HDDS-10041:
---------------------------------

             Summary: Do not start the daemon inside the OzoneManagerDoubleBuffer constructor
                 Key: HDDS-10041
                 URL: https://issues.apache.org/jira/browse/HDDS-10041
             Project: Apache Ozone
          Issue Type: Sub-task
          Components: OM
            Reporter: Tsz-wo Sze
            Assignee: Tsz-wo Sze


It is generally a bad practice to start a thread inside a constructor; see https://stackoverflow.com/questions/11834173/why-shouldnt-i-use-thread-start-in-the-constructor-of-my-class

Also, quite a few tests (such as TestOzoneManagerDoubleBuffer) has to stop the daemon till to eliminate the race condition in the very beginning.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org