8000 Getting contents of lock without acquiring the lock · Issue #52 · cirello-io/dynamolock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Getting contents of lock without acquiring the lock #52
Closed
@aashishkapur

Description

@aashishkapur

Hi,
I was trying to get the contents of a lock without acquiring the lock, but found that when I tried to get the lock,

lock, err = client.Get(dynamoLockName)

I received a lock with no data.

I looked into Get, and found that this branch was getting executed: https://github.com/cirello-io/dynamolock/blob/master/client.go#L906, because the lock is currently not held. Therefore, an empty lock is returned, with no data.

I'm happy to make a PR to fix this by removing the lockItem.isReleased check, but wanted to confirm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0