Update code to reflect renaming on UnlockResponse.Status (#1958)
PR dapr/dapr#4989 (issue dapr/dapr#4988) updated the names of some enums in `UnlockResponse.Status` ProtoBuff definition: * `LOCK_UNEXIST` became `LOCK_DOES_NOT_EXIST ` * `LOCK_BELONG_TO_OTHERS` became `LOCK_BELONGS_TO_OTHERS` Code implementing Distributed Lock component in components-contrib needs to be updated to account for this modification. This PR accomplishes this by updating contants mapping back to the two enums above to match their new names. Fixes components-contrib#1950 Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org> Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This commit is contained in:
parent
b3e18bb11d
commit
2050bb9514
|
@ -173,9 +173,9 @@ func (r *StandaloneRedisLock) Unlock(req *lock.UnlockRequest) (*lock.UnlockRespo
|
|||
if i >= 0 {
|
||||
status = lock.Success
|
||||
} else if i == -1 {
|
||||
status = lock.LockUnexist
|
||||
status = lock.LockDoesNotExist
|
||||
} else if i == -2 {
|
||||
status = lock.LockBelongToOthers
|
||||
status = lock.LockBelongsToOthers
|
||||
}
|
||||
return &lock.UnlockResponse{
|
||||
Status: status,
|
||||
|
|
|
@ -27,8 +27,8 @@ type Status int32
|
|||
|
||||
// lock status.
|
||||
const (
|
||||
Success Status = 0
|
||||
LockUnexist Status = 1
|
||||
LockBelongToOthers Status = 2
|
||||
InternalError Status = 3
|
||||
Success Status = 0
|
||||
LockDoesNotExist Status = 1
|
||||
LockBelongsToOthers Status = 2
|
||||
InternalError Status = 3
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue