Comment 6 for bug 1558

Revision history for this message
Dafydd Harries (daf) wrote : Re: system error while exporting files

It occurred to me that this problem might happen if somebody requests a single file and then later requests a tarball which also contains that file while that file is still in the export queue. The reverse situation (tar file, then single file) would also cause the error.

After discussing this with Steve, we decided that the correct thing to do is to remove the database constraint and allow people to request the same file as many times as they want. This creates a new corner case where the code will try to create a tar file with the same file twice. In order to avoid this, a set() of files should be created before deciding whether to create a tar file or not. If there is more than one file in the set, a tar file should be created; otherwise only a single file need be exported.