Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: allow creating nodes and directories with the same name #1855

Closed
glerchundi opened this issue Dec 4, 2014 · 6 comments
Closed

Comments

@glerchundi
Copy link

As i mentioned some weeks ago (#1301), I would like to have the possibility to create nodes and directories with the same at the same path. This is motivated by this project: https://github.com/glerchundi/parkeeper.

@xiang90 xiang90 added the maybe label Dec 5, 2014
@xiang90 xiang90 modified the milestones: v0.6.0maybe, v0.6.0 Dec 5, 2014
@xiang90
Copy link
Contributor

xiang90 commented Dec 11, 2014

we accepted this feature request. we will implement this in the v3 api.

/cc @barakmich @kelseyhightower

@glerchundi
Copy link
Author

perfect, thanks!

@coquin
Copy link

coquin commented Apr 23, 2015

I tried to reproduce this issue but I couldn't:

  1. Create a directory dir:

    curl http://127.0.0.1:2379/v2/keys/dir -XPUT -d dir=true
    
    => {
        "action": "set",
        "node": {
            "createdIndex": 1,
            "dir": true,
            "key": "/dir",
            "modifiedIndex": 1
        }
    }
    
  2. Add a node dir to this directory:

    curl http://127.0.0.1:2379/v2/keys/dir/dir -XPUT -d value=bar
    
    => {
        "action": "set",
        "node": {
            "createdIndex": 2,
            "key": "/dir/dir",
            "modifiedIndex": 2,
            "value": "bar"
        }
    }
    

It works. And if I list dir directory contents it returns this dir node without any errors.

@glerchundi, could you, please, confirm that it works for you too or clarify your case (step to reproduce and/or a bit more info about this feature request)?

@glerchundi
Copy link
Author

@coquin, i want to be able to create a node alongside the folder (with the same name), not inside it, this shouldn't work:

curl http://127.0.0.1:2379/v2/keys/dir -XPUT -d dir=true
curl http://127.0.0.1:2379/v2/keys/dir -XPUT -d value=bar

@yichengq
Copy link
Contributor

@xiang90 Do we want to support this in v2? A unix file system doesn't support to set value to dir, but zookeeper seems to support that.

@xiang90
Copy link
Contributor

xiang90 commented Jun 6, 2015

@glerchundi Please take a look at the v3 api under /doc/rfc. Thanks!

@xiang90 xiang90 closed this as completed Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants