netsec-ethz / fpki

4 stars 1 forks source link

Ingest pipeline breaks order after last file #63

Open juagargi opened 3 months ago

juagargi commented 3 months ago

The ingest command ingests files into the DB.

The processing pipeline is:

  1. Open file in Processor
  2. Parse file, send each certificate to CertificateProcessor
  3. In multiple routines, create batches of certificates, in CertificateProcessor
  4. For each batch, in an independent routine, update the DB.
  5. The CertificateProcessor waits until all its batches are updated.
  6. The Processor waits until the CertificateProcessor is done
  7. The Processor calls OnBundleFinished if the # of certs is a bundle, or at end

The bug appears:

This bug makes the last batches not to be ready for the next steps, done on OnBundleFinished, thus creating an incomplete view of the certificate landscape represented by the files.

We need to: