stronglink
stronglink copied to clipboard
Query result ordering when meta-files have multiple matching targets
Meta-files can only have a single target URI, but that address can theoretically match multiple files (as in semantic hashes (TBA) or hash collisions like with MD5). Right now we (mostly) guarantee that the target file is added before the meta-file is, which is necessary to ensure that query results don't change after the fact. However if a (duplicate) file is added that matches the URI of an existing meta-file, this ordering guarantee can be violated.
Possible options:
- Fix the query system so that results are only listed once the meta-file and file exist (guarantees ordering but probably slow/complicated)
- Disallow meta-files with multiple targets (especially semantic hashing)
- Relax guarantees about "duplicate" files
- Something else?
Note that we currently go through a lot of work in the filter system to support multiple files "per" meta-file. If we disallowed multiple targets, that could be vastly simplified.