zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...
Date Thu, 11 Jan 2018 14:39:55 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/447#discussion_r160971106
  
    --- Diff: src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java ---
    @@ -280,6 +278,12 @@ public synchronized boolean addSession(long id, int sessionTimeout)
{
             return added;
         }
     
    +    public synchronized boolean commitSession(long id, int sessionTimeout) {
    --- End diff --
    
    `sessionsWithTimeout` is a Map within ZKdb, so adding sessions to it is equivalent to
persisting them.
    
    I think you could also remove the `addGlobalSession()` method completely, because it doesn't
do anything special than forwarding the call to `addSession()`.


---

Mime
View raw message