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

Updating function to avoid collisions #57

Open
icaoberg opened this issue Feb 21, 2022 · 1 comment
Open

Updating function to avoid collisions #57

icaoberg opened this issue Feb 21, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@icaoberg
Copy link

icaoberg commented Feb 21, 2022

Consider the following payload

{"entity_type": "FILE", "parent_ids": ["21cfe0f6c3368b06237716a6b48f5825"], "file_info": [{"path": "21cfe0f6c3368b06237716a6b48f5825-metadata.tsv", "size": 1092, "checksum": "bf3bae1aeaff3a6010a713380ef5271c", "base_dir": "DATA_UPLOAD"}, {"path": "extras/contributors.tsv", "size": 480, "checksum": "e3bb5373a2875380e0dd2e5aa60c5b2b", "base_dir": "DATA_UPLOAD"}, {"path": "hg19.exonic+intronic/fastq/Puck_200501_25.read1.fastq.gz", "size": 3826680202, "checksum": "eca2160974c2d68850b96a3640154b9d", "base_dir": "DATA_UPLOAD"}]}

If I submit the same payload twice, the entries will appear more than once in db with different UUIDs. I would like to update the code so that each entry must have a unique combination of

  • parent_ids
  • file_info.path
  • file_info.checksum

to help avoid collisions. That is, if there already exists a UUID for an entry with a combination of those 3 fields, then the API should return the existing UUID rather than generating a new one.

cc @pdblood

@icaoberg icaoberg added the enhancement New feature or request label Feb 21, 2022
@icaoberg
Copy link
Author

@shirey any updates on this ticket? Has it been implemented? When will it be implemented?

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

No branches or pull requests

1 participant