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

If dir=true and prevExist=true but the target node is a key it turns into a dir #518

Closed
philips opened this issue Jan 31, 2014 · 6 comments

Comments

@philips
Copy link
Contributor

philips commented Jan 31, 2014

If dir=true and prevExist=true PUT only if the target node is a directory. Otherwise return "Not a directory".

Via: https://github.com/coreos/go-etcd/issues/90

/cc @onsi

@onsi
Copy link

onsi commented Jan 31, 2014

I think you mean don't PUT unless node is a dir?

On Friday, January 31, 2014, Brandon Philips notifications@github.com
wrote:

If dir=true and prevExist=true don't PUT if the target node is a
directory.

Via: coreos/go-etcd#90 https://github.com/coreos/go-etcd/issues/90

/cc @onsi https://github.com/onsi

Reply to this email directly or view it on GitHubhttps://github.com//issues/518
.

@philips
Copy link
Contributor Author

philips commented Jan 31, 2014

@onsi Right, fixed.

@yichengq yichengq added the bug label Aug 28, 2014
iankronquist added a commit to iankronquist/etcd that referenced this issue Jan 25, 2015
Before adding IsKeyDir we should add tests.
IsKeyDir is necessary to address etcd-io#518 on github
iankronquist added a commit to iankronquist/etcd that referenced this issue Jan 25, 2015
IsKeyDir is needed so we can check if a given key is a directory. This
should be a public method because we need to check whether a request
includes Dir=true in etcdserver.

Addressed issue etcd-io#518 on github.
iankronquist added a commit to iankronquist/etcd that referenced this issue Jan 25, 2015
Test that if dir=true and prevExist=true PUT only if the target node is a
directory. Otherwise return "Not a directory".
Addresses issue etcd-io#518 on github
iankronquist added a commit to iankronquist/etcd that referenced this issue Jan 25, 2015
If dir=true and prevExist=true PUT only if the target node is a
directory. Otherwise return "Not a directory".

Addresses etcd-io#518 on github.
@iankronquist
Copy link

I'm doing some work to address this.

@iankronquist
Copy link

Thoughts on the PR?

@xiang90
Copy link
Contributor

xiang90 commented Mar 29, 2016

@philips It seems like this does not really cause any issue in practice. Fixing this needs some effort (see #2147). I prefer to mark this won't fix.

gyuho added a commit to gyuho/etcd that referenced this issue May 11, 2016
gyuho added a commit to gyuho/etcd that referenced this issue May 11, 2016
gyuho added a commit to gyuho/etcd that referenced this issue May 11, 2016
gyuho added a commit to gyuho/etcd that referenced this issue May 11, 2016
gyuho added a commit to gyuho/etcd that referenced this issue May 11, 2016
@gyuho gyuho removed their assignment May 11, 2016
@gyuho
Copy link
Contributor

gyuho commented May 13, 2016

@gyuho gyuho closed this as completed May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants