-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
fix v1 handler: use create command when test against prevexistence #247
Conversation
@benbjohnson This should fix the single node test. |
@xiangli-cmu Travis seems upset still
|
@philips That tests call |
@xiangli-cmu The code is not compiling the binary. I'm getting this error when running build: src/github.com/coreos/etcd/server/v1/set_key_handler.go:4: imported and not used: "fmt" The |
@xiangli-cmu Added the |
if response.PrevValue == "" { | ||
response.NewKey = true | ||
} | ||
} | ||
|
||
if response.Action == CompareAndSwap || response.Action == Create { | ||
response.Action = "testAndSet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiangli-cmu Is this set to testAndSet
for backwards compatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Create is test against prevValue="" in v1
@xiangli-cmu Logically, it seems like there should just be a Outside of the design question of |
@benbjohnson We do not have many operation inside the store. Command is just wrapper. But we can even cleanup the wrappers in the future. |
fix v1 handler: use create command when test against prevexistence
No description provided.