Skip to content

Race condition in submit.py:post #1317

@ponyisi

Description

@ponyisi

We have, in

dataset_manager.refresh()
# If this request has a fresh DID then submit the lookup request to the DID Finder
if dataset_manager.is_lookup_required:
dataset_manager.submit_lookup_request(
self._generate_advertised_endpoint(
"servicex/internal/transformation/"
),
self.celery_app,
)
request_rec.status = TransformStatus.lookup
, a check on dataset_manager.is_lookup_required and then potentially a lookup request submission which changes the value of that property to prevent further lookups. It seems that it is currently possible for multiple processes to hit this check simultaneously for a single dataset and trigger multiple lookups (which corrupts the file records). This block needs to do a row lock on the relevant dataset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions