HomeSoftware Heritage

storage: Identify and provide the collision hashes in exception

Description

storage: Identify and provide the collision hashes in exception

This matches, what's done in other storage backends. There is no consistency
for now though, storage backends provides as HashCollision exception parameters
the content information as:

  • cassandra: (algo: str, hash_id: bytes, Content as cassandra Row)
  • in_memory: (algo: str, hash_id: bytes, Content as Tuple[str, bytes]
  • pgstorage: algo: Optional[str]

Opening this diff to discuss how to properly land this.

Details