Github user anmolnar commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/447#discussion_r160970304 --- Diff: src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java --- @@ -579,13 +579,8 @@ protected void pRequest2Txn(int type, long zxid, Request request, int to = request.request.getInt(); request.setTxn(new CreateSessionTxn(to)); request.request.rewind(); - if (request.isLocalSession()) { - // This will add to local session tracker if it is enabled - zks.sessionTracker.addSession(request.sessionId, to); - } else { - // Explicitly add to global session if the flag is not set - zks.sessionTracker.addGlobalSession(request.sessionId, to); - } + // only add the global session tracker but not to ZKDb + zks.sessionTracker.addGlobalSession(request.sessionId, to); --- End diff -- You could remove this check safely, because effectively there was no difference between `addSession()` and `addGlobalSession()` calls.
---