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

Checking of closed in DFSInputStream#pread() should be protected by synchronization

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

        private int pread(long position, byte[] buffer, int offset, int length)
            throws IOException {
          // sanity checks
          dfsClient.checkOpen();
          if (closed) {
      

      Checking of closed should be protected by holding lock on "DFSInputStream.this"

        Attachments

        1. hdfs-7494-002.patch
          3 kB
          Ted Yu
        2. hdfs-7494-001.patch
          3 kB
          Ted Yu

          Issue Links

            Activity

              People

              • Assignee:
                yuzhihong@gmail.com Ted Yu
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: