OneSizeFitsQuorum commented on code in PR #8654:
URL: https://github.com/apache/iotdb/pull/8654#discussion_r1062086547
##########
node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncConfigNodeHeartbeatServiceClient.java:
##########
@@ -53,41 +55,44 @@ public AsyncConfigNodeHeartbeatServiceClient(
this.clientManager = clientManager;
}
- public void close() {
- ___transport.close();
- ___currentMethod = null;
- }
-
- /**
- * return self if clientManager is not null, the method doesn't need to call
by user, it will
- * trigger once client transport complete.
- */
- private void returnSelf() {
- if (clientManager != null) {
- clientManager.returnClient(endpoint, this);
- }
- }
-
- /**
- * This method will be automatically called by the thrift selector thread,
and we'll just simulate
- * the behavior in our test
- */
@Override
public void onComplete() {
super.onComplete();
returnSelf();
}
- /**
- * This method will be automatically called by the thrift selector thread,
and we'll just simulate
- * the behavior in our test
- */
@Override
public void onError(Exception e) {
super.onError(e);
+ ThriftClient.resolveException(e, this);
Review Comment:
So far this is just a debug log, but we still need to clear all related
invalid clients when datanode fails down, what do you think?
##########
node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncDataNodeHeartbeatServiceClient.java:
##########
@@ -53,41 +55,44 @@ public AsyncDataNodeHeartbeatServiceClient(
this.clientManager = clientManager;
}
- public void close() {
- ___transport.close();
- ___currentMethod = null;
- }
-
- /**
- * return self if clientManager is not null, the method doesn't need to call
by user, it will
- * trigger once client transport complete.
- */
- private void returnSelf() {
- if (clientManager != null) {
- clientManager.returnClient(endpoint, this);
- }
- }
-
- /**
- * This method will be automatically called by the thrift selector thread,
and we'll just simulate
- * the behavior in our test
- */
@Override
public void onComplete() {
super.onComplete();
returnSelf();
}
- /**
- * This method will be automatically called by the thrift selector thread,
and we'll just simulate
- * the behavior in our test
- */
@Override
public void onError(Exception e) {
super.onError(e);
+ ThriftClient.resolveException(e, this);
Review Comment:
So far this is just a debug log, but we still need to clear all related
invalid clients when datanode fails down, what do you think?
--
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]