HomeSoftware Heritage

content_add: Write to the objstorage before the DB or Kafka

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

Description

content_add: Write to the objstorage before the DB or Kafka

Must add to the objstorage before the DB and journal. Otherwise:

  1. in case of a crash the DB may "believe" we have the content, but we didn't have time to write to the objstorage before the crash
  2. the objstorage mirroring, which reads from the journal, may attempt to read from the objstorage before we finished writing it

This is already done in the postgresql backend unintentionally since
209de5dbaa127dacd114fbbd084f22632982eb77.

This commit documents it, makes the cassandra backend behave that way too,
and adds a test.

Details

Provenance
vlorentzAuthored on Mar 15 2021, 12:50 PM
vlorentzPushed on Mar 15 2021, 3:59 PM
Build Status
Buildable 19915
Build 30931: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.