You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/11/05 06:16:27 UTC

[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #522: IOTDB-290 Bug about threadlocal field in TSServiceImpl.java

qiaojialin commented on a change in pull request #522: IOTDB-290 Bug about threadlocal field in TSServiceImpl.java
URL: https://github.com/apache/incubator-iotdb/pull/522#discussion_r342394759
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
 ##########
 @@ -145,8 +94,9 @@
   // Record the username for every rpc connection. Username.get() is null if
   // login is failed.
   protected ThreadLocal<String> username = new ThreadLocal<>();
-  private ThreadLocal<HashMap<String, PhysicalPlan>> queryStatus = new ThreadLocal<>();
-  private ThreadLocal<HashMap<String, QueryDataSet>> queryRet = new ThreadLocal<>();
+  protected ThreadLocal<AtomicLong> queryId = new ThreadLocal<>();
+  private ThreadLocal<HashMap<Long, PhysicalPlan>> queryStatus = new ThreadLocal<>();
 
 Review comment:
   Maybe a structure QueryContext could be used, which contains a query id, PhysicalPlan and QueryDataSet. If you put these fields here, it's better to add some comments. For example, queryStatus means a queryId -> PhysicalPlan. 

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


With regards,
Apache Git Services