[Bug][Broker] Fix bug that the error exception is not caught when closing the broker writer (#4034)
Broker should return the error status. Fix #4033
This commit is contained in:
@ -586,6 +586,8 @@ public class FileSystemManager {
|
||||
fsDataInputStream.close();
|
||||
} catch (IOException e) {
|
||||
logger.error("errors while close file input stream", e);
|
||||
throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,
|
||||
e, "errors while close file input stream");
|
||||
} finally {
|
||||
clientContextManager.removeInputStream(fd);
|
||||
}
|
||||
@ -645,6 +647,8 @@ public class FileSystemManager {
|
||||
fsDataOutputStream.close();
|
||||
} catch (IOException e) {
|
||||
logger.error("errors while close file output stream", e);
|
||||
throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,
|
||||
e, "errors while close file output stream");
|
||||
} finally {
|
||||
clientContextManager.removeOutputStream(fd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user