zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Han (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3471) Potential lock unavailable due to dangling ephemeral nodes left during local session upgrading
Date Mon, 12 Aug 2019 22:31:00 GMT

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

Michael Han commented on ZOOKEEPER-3471:
----------------------------------------

[~lvfangmin] I feel I get the race condition you described at a high level, but I had a hard
time to actually construct a conceptual model on the race that maps to the code (due to the
convoluted session handling codes). 

Do you mind to provide a little bit more concrete examples on where exactly the race happening?
In particular:

bq. delete the session from both local and global session tracker

Does this happen before or after the session upgrade finish? As we know, the session upgrade
finishing by commit a session in quorum, so if this delete from session tracker finishes before
session upgrading finish, then the commit session will re-add the session back; if this delete
is finished after session upgrading finish, then we still have the session on other quorum
servers. So every case seems ok?

> 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: 0.5h
>  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
(v7.6.14#76016)

Mime
View raw message