You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/10 12:15:26 UTC

[GitHub] [skywalking] dmsolr commented on a change in pull request #5989: FIX: fix thrift

dmsolr commented on a change in pull request #5989:
URL: https://github.com/apache/skywalking/pull/5989#discussion_r540119471



##########
File path: apm-sniffer/apm-sdk-plugin/thrift-plugin/src/main/java/org/apache/skywalking/apm/plugin/thrift/wrapper/ServerInProtocolWrapper.java
##########
@@ -57,10 +64,11 @@ public void initial(AbstractContext context) {
     @Override
     public TField readFieldBegin() throws TException {
         final TField field = super.readFieldBegin();
+        Map<String, String> header = new HashMap<>(1);

Review comment:
       The variable is visible in the if statement block. So we don't need to move it out of the if statement block.
   

##########
File path: apm-sniffer/apm-sdk-plugin/thrift-plugin/src/main/java/org/apache/skywalking/apm/plugin/thrift/wrapper/ServerInProtocolWrapper.java
##########
@@ -81,6 +90,20 @@ public TField readFieldBegin() throws TException {
             }
             return readFieldBegin();
         }
+        if (field.type == TType.STOP && !HAVE_CREATED.get()) {

Review comment:
       I don't recommend to use `ThreadLocal` here.

##########
File path: apm-sniffer/apm-sdk-plugin/thrift-plugin/src/main/java/org/apache/skywalking/apm/plugin/thrift/wrapper/ServerInProtocolWrapper.java
##########
@@ -81,6 +90,20 @@ public TField readFieldBegin() throws TException {
             }
             return readFieldBegin();
         }
+        if (field.type == TType.STOP && !HAVE_CREATED.get()) {

Review comment:
       Would you try to do it without `ThreadLocal`?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org