|
|
@@ -65,9 +65,8 @@ func (a *applierV2store) Put(r *pb.Request) Response {
|
|
|
if exists {
|
|
|
if r.PrevIndex == 0 && r.PrevValue == "" {
|
|
|
return toResponse(a.store.Update(r.Path, r.Val, ttlOptions))
|
|
|
- } else {
|
|
|
- return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions))
|
|
|
}
|
|
|
+ return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions))
|
|
|
}
|
|
|
return toResponse(a.store.Create(r.Path, r.Dir, r.Val, false, ttlOptions))
|
|
|
case r.PrevIndex > 0 || r.PrevValue != "":
|