zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fangmin Lv (Jira)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3471) Potential lock unavailable due to dangling ephemeral nodes left during local session upgrading
Date Tue, 08 Oct 2019 18:04:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16947091#comment-16947091
] 

Fangmin Lv commented on ZOOKEEPER-3471:
---------------------------------------

Hi Michael, sorry for the lately reply, just saw your comment here.

Here is the detailed flow for this issue:
 # client created a local session s1
 # it then issued create ephemeral node request, which will go through the FollowerRequestProcessor,
check and upgrade the session
 # but before it's finished checking, the client issued close session request immediately,
which will be treated as a local session
 # in case the previous upgrading session is finished and committed, then executing the local
close session in step 3 in FinalRequestProcessor, [LearnerSessionTracker|[https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java#L76]]
will remove it from both local session and global session
 # so the global session will miss on this learner, but exists on others.

Let me know if this is not clear.

> Potential lock unavailable due to dangling ephemeral nodes left during local session
upgrading
> ----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3471
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3471
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.6.0
>            Reporter: Fangmin Lv
>            Assignee: Fangmin Lv
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 3.6.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> There is a race condition which might be triggered if the client create session, upgrading
the session with ephemeral node, then immediately issued close session request before it's
removed from local session tracker.
>  
> The close session request will be treated as a local session close request since it still
exists in the local session tracker, which goes through the ZK pipeline and delete the session
from both local and global session tracker. Since the session is not tracked anymore, it will
leave the ephemeral nodes there.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message