Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9347

Invariant assumption in TestQuorumJournalManager.shutdown() is wrong

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 2.7.3, 2.6.5, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The code

      TestTestQuorumJournalManager.java
      @After
        public void shutdown() throws IOException {
          IOUtils.cleanup(LOG, toClose.toArray(new Closeable[0]));
          
          // Should not leak clients between tests -- this can cause flaky tests.
          // (See HDFS-4643)
          GenericTestUtils.assertNoThreadsMatching(".*IPC Client.*");
          
          if (cluster != null) {
            cluster.shutdown();
          }
        }
      

      implicitly assumes when the call returns from IOUtils.cleanup() (which calls close() on QuorumJournalManager object), all IPC client connection threads are terminated. However, there is no internal implementation that enforces this assumption. Even if the bug reported in HADOOP-12532 is fixed, the internal code still only ensures IPC connections are terminated, but not the thread.

        Attachments

        1. HDFS-9347.001.patch
          3 kB
          Wei-Chiu Chuang
        2. HDFS-9347.002.patch
          6 kB
          Wei-Chiu Chuang
        3. HDFS-9347.003.patch
          6 kB
          Wei-Chiu Chuang
        4. HDFS-9347.004.patch
          5 kB
          Wei-Chiu Chuang
        5. HDFS-9347.005.patch
          5 kB
          Wei-Chiu Chuang
        6. HDFS-9347.006.patch
          5 kB
          Wei-Chiu Chuang

        Issue Links

          Activity

            People

            • Assignee:
              weichiu Wei-Chiu Chuang
              Reporter:
              weichiu Wei-Chiu Chuang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment