Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7982

NPE in BlockInputStream due to null pipeline after refresh

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce:

      1. Start cluster with 5 datanodes
      2. Create EC(3,2) key
      3. Stop a datanode that has data blocks (non-parity)
      4. Try to read the key before the datanode is marked as dead in SCM

      Result:

      java.lang.NullPointerException
      	at org.apache.hadoop.hdds.scm.storage.BlockInputStream.getChunkInfos(BlockInputStream.java:220)
      	at org.apache.hadoop.hdds.scm.storage.BlockInputStream.initialize(BlockInputStream.java:144)
      	at org.apache.hadoop.hdds.scm.storage.BlockInputStream.readWithStrategy(BlockInputStream.java:281)
      	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:64)
      	at org.apache.hadoop.hdds.scm.storage.ByteBufferReader.readFromBlock(ByteBufferReader.java:56)
      	at org.apache.hadoop.ozone.client.io.ECBlockInputStream.readFromStream(ECBlockInputStream.java:414)
      	at org.apache.hadoop.ozone.client.io.ECBlockInputStream.readWithStrategy(ECBlockInputStream.java:354)
      	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:64)
      	at org.apache.hadoop.ozone.client.io.ECBlockInputStream.read(ECBlockInputStream.java:303)
      	at org.apache.hadoop.ozone.client.io.ECBlockInputStreamProxy.read(ECBlockInputStreamProxy.java:163)
      	at org.apache.hadoop.ozone.client.io.ECBlockInputStreamProxy.read(ECBlockInputStreamProxy.java:148)
      	at org.apache.hadoop.hdds.scm.storage.ByteArrayReader.readFromBlock(ByteArrayReader.java:57)
      	at org.apache.hadoop.hdds.scm.storage.MultipartInputStream.readWithStrategy(MultipartInputStream.java:96)
      	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:54)
      	at org.apache.hadoop.ozone.client.io.OzoneInputStream.read(OzoneInputStream.java:56)
      	at java.base/java.io.InputStream.read(InputStream.java:205)
      	at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:94)
      	at org.apache.hadoop.ozone.shell.keys.GetKeyHandler.execute(GetKeyHandler.java:88)
      

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: