comnetwork commented on a change in pull request #4039:
URL: https://github.com/apache/hbase/pull/4039#discussion_r787323310
##########
File path:
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java
##########
@@ -231,7 +231,11 @@ private void completed(Channel channel) {
// so that the implementation will not burn up our brain as there are
multiple state changes and
// checks.
private synchronized void failed(Channel channel, Supplier<Throwable>
errorSupplier) {
- if (state == State.BROKEN || state == State.CLOSED) {
+ if (state == State.CLOSED) {
+ return;
+ }
+ if (state == State.BROKEN) {
+ failWaitingAckQueue(channel, errorSupplier);
Review comment:
@Apache9, thank you for the suggestion for the test. Assuming dn2 and
dn3 are slow DNs, the simple way I can think to simulate DNs is to discard the
message when flushing to dn2 and dn3. Seems it is hard to simulate the slow
response from dn2 and dn3, because it seems to require hack to Netty
implementation and seems more complex, and because Netty event loop is a single
thread, I could not block in it to hang other messages. What is your opinion?
And Because the `FanOutOneBlockAsyncDFSOutput` is created by
`FanOutOneBlockAsyncDFSOutputHelper.createOutput`, seems could just Mockito
`FanOutOneBlockAsyncDFSOutputHelper.createOutput`'s input parameter.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]