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 2021/07/02 09:32:44 UTC

[GitHub] [iotdb] Alima777 commented on a change in pull request #3483: [WIP] Session timeout

Alima777 commented on a change in pull request #3483:
URL: https://github.com/apache/iotdb/pull/3483#discussion_r662875652



##########
File path: server/src/main/java/org/apache/iotdb/db/query/control/SessionTimeoutManager.java
##########
@@ -30,14 +30,18 @@
 import java.util.concurrent.TimeUnit;
 
 public class SessionTimeoutManager {
-  private static final long CLEANUP_PERIOD_MILLIS = 10 * 1000; // TODO: Use a more reasonable value
+  private static final long SESSION_TIMEOUT =
+      IoTDBDescriptor.getInstance().getConfig().getSessionTimeoutThreshold();
+  private static final long CLEANUP_PERIOD_MILLIS = Math.max(5000, SESSION_TIMEOUT / 5);
   private static final Logger LOGGER = LoggerFactory.getLogger(SessionTimeoutManager.class);
 
-  private Map<Long, SessionInfo> idToSessionInfo;
+  private Map<Long, Long> idToLastActiveTime;

Review comment:
       Rename `sessionIdToLastActiveTime`?




-- 
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: reviews-unsubscribe@iotdb.apache.org

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