Jackie-Jiang commented on code in PR #8491:
URL: https://github.com/apache/pinot/pull/8491#discussion_r849797221
##########
pinot-core/src/main/java/org/apache/pinot/core/transport/ServerRoutingInstance.java:
##########
@@ -87,17 +100,20 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
- if (o == null || getClass() != o.getClass()) {
+ if (!(o instanceof ServerRoutingInstance)) {
return false;
}
ServerRoutingInstance that = (ServerRoutingInstance) o;
- return _tlsEnabled == that._tlsEnabled && _port == that._port &&
_hostname.equals(that._hostname)
- && _tableType == that._tableType;
+ // NOTE: Only check hostname, port and tableType for performance concern
because they can identify a routing
+ // instance within the same query
+ return _hostname.equals(that._hostname) && _port == that._port &&
_tableType == that._tableType;
}
@Override
public int hashCode() {
- return Objects.hash(_tlsEnabled, _hostname, _port, _tableType);
+ // NOTE: Only check hostname, port and tableType for performance concern
because they can identify a routing
+ // instance within the same query
+ return Objects.hash(_hostname, _port, _tableType);
Review Comment:
Done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]