Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

1.5.0 Porting : Fixed a side effect of Arcus interceptor #1171 #1174

Closed
emeroad opened this issue Nov 11, 2015 · 0 comments
Closed

1.5.0 Porting : Fixed a side effect of Arcus interceptor #1171 #1174

emeroad opened this issue Nov 11, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@emeroad
Copy link
Member

emeroad commented Nov 11, 2015

1.5.0 porting #1171

Side effect : faild to failover.
Root cause : Unnecessary reverse DNS lookup
Bug fix : Avoid DNS lookup API.

  • ApiInterceptor.java
  • FutureGetInterceptor.java
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
...
            final Operation op = (Operation) getOperation.invoke(target);
            if (op != null) {
                MemcachedNode handlingNode = op.getHandlingNode();
                if (handlingNode != null) {
                    SocketAddress socketAddress = handlingNode.getSocketAddress();
                    if (socketAddress instanceof InetSocketAddress) {
                        InetSocketAddress address = (InetSocketAddress) socketAddress;
                       // ROOT Cause : Unnecessary DNS look ->  InetSocketAddress.getHostName() 
                        trace.recordEndPoint(address.getHostName() + ":" + address.getPort());
                    }
                } else {
                    logger.info("no handling node");
                }
            } else {
                logger.info("operation not found");
            }
}
@emeroad emeroad added the bug label Nov 11, 2015
@emeroad emeroad added this to the 1.5.0 milestone Nov 11, 2015
emeroad added a commit to emeroad/pinpoint that referenced this issue Nov 11, 2015
 - modify dns lookup api
  InetSocketAddress.getHostName() -> InetAddress.getHostAddress()
pinpoint-apm#1171 porting
emeroad added a commit that referenced this issue Nov 11, 2015
…effect

#1174 Fixed a side effect of Arcus interceptor
@emeroad emeroad self-assigned this Nov 11, 2015
@emeroad emeroad closed this as completed Nov 23, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant