HomeSoftware Heritage

storage: check uniqueness based on all relevant columns, not just id and…

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

storage: check uniqueness based on all relevant columns, not just id and indexer_configuration_id.

ctags and fossology can legitimately add multiple objects with the same
id and indexer_configuration_id at the same time, but different values
for other columns.

Before this commit, it would immediately crash the 'check_id_duplicates'
checks.

As a side-effect, this commit also remove the 'add_merge' logic in the
in-memory storage, and stores it like proper rows like the pg does instead
of working around this broken deduplication.

As an other side-effect, removing this broken logic removes an
inconsistency between the in-mem and pg storage (see the added tests
named test_add_empty for Ctags and Fossology), which Fossology indexer
tests relied on, so this commit updates these tests as well.

Commit No Longer Exists

This commit no longer exists in the repository.