Skip to content

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

@ThisWillGoWell

Description

@ThisWillGoWell

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions