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

Consul kv race condition 'Error setting "$key" (200)' #114

Open
ThisWillGoWell opened this issue May 3, 2018 · 0 comments
Open

Consul kv race condition 'Error setting "$key" (200)' #114

ThisWillGoWell opened this issue May 3, 2018 · 0 comments

Comments

@ThisWillGoWell
Copy link

There appears to be some sort of race condition when setting/deleting a key from two different threads/processes. For example:

import consulate
import threading

def update():
    try:
        session.kv['test'] = 'true'
        del session.kv['test']
    except Exception as e:
        print(e)

session = consulate.Session()
threading.Thread(target=update).start()
threading.Thread(target=update).start()

will produce:

'Error setting "test" (200)'

Consul is running in a local docker container.
Is the the expected behavior/why does consul return a 200 with empty body?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant