zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tamas Penzes (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-2051) Creating ephemeral znodes from within a transaction fail with local sessions
Date Fri, 26 Oct 2018 09:46:00 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tamas Penzes updated ZOOKEEPER-2051:
------------------------------------
    Priority: Major  (was: Critical)

> Creating ephemeral znodes from within a transaction fail with local sessions
> ----------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2051
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2051
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.0
>            Reporter: Raul Gutierrez Segales
>            Assignee: Raul Gutierrez Segales
>            Priority: Major
>             Fix For: 3.6.0
>
>
> With local sessions enabled, the premise is that as soon as you try to create an ephemeral
znode your session will be upgraded to global. The problem is that the session upgrade logic
doesn't intercept transactions. So creating an ephemeral znode from within a transaction fails
with SessionExpired.
> A small example with Kazoo:
> {noformat}
> from kazoo.client import KazooClient
> k = KazooClient("localhost:2181")
> k.start()
> t = k.transaction()
> t.create("/hello_", "", ephemeral=True)
> t.commit()
> [kazoo.exceptions.SessionExpiredError((), {})]
> {noformat}
> A workaround, for now, is to create an ephemeral before your transaction which forces
your session to be upgraded.
> Possible solutions could be:
> * extending zookeeper_init() so that you can request global=True
> *  and/or, providing an upgradeSession() API
> Thoughts?
> cc: [~thawan], [~phunt], [~fpj]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message