bshashikant commented on pull request #1523: URL: https://github.com/apache/ozone/pull/1523#issuecomment-729486936
> > Usually, while trying to read a block. we first try to read the chunkInfo from datanodes during BlocknInputStream initialize() , and if that fails, we try to refresh the pipeline in case of regular read. > > That's right. But after initialization there is no guarantee that the pipeline will be there until all data is read. Failures may happen any time. > > > With unbuffer, connections to datanodes is closed, and the data will be the probably be read at later point of time. In cases as such, we might need to reinitialize BlockInputStream again. > > I think always reinitializing the stream on first read after unbuffer would eliminate performance advantages of unbuffering, the client might as well close and open the file again. Otherwise we need to come up with a list of specific errors, result codes that trigger reinitialization if encountered during read (while all other errors should still be propagated to the caller). Do you have a suggestion for this of errors/result codes? I think we can atleast try to refresh for error like CONTAINER_NOT_FOUND , where it means either the container replica is deleted, or disks have gone bad. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
