higlass / higlass/higlass-server
Do pre-flight check for conflicting UIDs
- Dominant language
- Python
- Stars
- 22
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
The database update happens at the end of an ingest. Particularly with large files this can be annoying: I up-arrow to rerun a command from the history, and it's only at the end when it tries to ingest it into the database that I get an error because of the reused ID.
- Simplest fix would be to query the database at the very start, if the user has given an ID.
- Or, slightly more sophisticated: add a placeholder record at the start of the script, and then update that at the end. This would be more robust against race conditions, but not sure if it's worth the complexity.
```
$ docker exec higlass-container python higlass-server/manage.py ingest_tileset --filename /tmp/$COOLER --filetype cooler --datatype matrix --uid $ID
Traceback (most recent call last):
...
File "/home/higlass/projects/higlass-server/tilesets/management/commands/ingest_tileset.py", line 35, in handle
name=name)
...
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: UNIQUE constraint failed: tilesets_tileset.uuid
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.