Skip to content
Snippets Groups Projects
  1. Dec 12, 2023
    • David Douard's avatar
      postgresql: improve db.origin_visit_status_add to fix possible replayer issues · 35c6339a
      David Douard authored
      In case of an existing OriginVisitStatus entry (typically with the
      'created' status), adding a new version of this entry should do an
      update instead of ignoring it. This could happen during a replayer session
      where the insertion of the OriginVisit used to automatically create an
      OriginVisitStatus in "created" status. This would then prevent the
      following replayer to actually insert the correct OriginVisitStatus.
      35c6339a
  2. Dec 11, 2023
  3. Dec 05, 2023
  4. Dec 04, 2023
  5. Dec 03, 2023
  6. Nov 29, 2023
  7. Nov 25, 2023
  8. Nov 24, 2023
  9. Nov 16, 2023
  10. Nov 07, 2023
  11. Oct 04, 2023
  12. Sep 26, 2023
    • David Douard's avatar
      postgresql: fix content_add_metadata() · 425d2c80
      David Douard authored
      it was using a generator like a list, effectively only inserting one
      content object per batch.
      The test needs to be modified to actually show the misbehavior, with the
      need for a inserting first one object before inserting a list of
      objects, otherwise the test is green without the fix (the reason is left
      as an exercice for the curious reader).
      
      Also fix a small type inconsistency on content_add() and use the same test
      pattern in test_content_add().
      425d2c80
    • David Douard's avatar
    • Jérémy Bobbio (Lunar)'s avatar
      Add a few “see also” to functions in swh.storage.algos · 3f08b6d6
      Jérémy Bobbio (Lunar) authored
      When browsing methods in StorageInterface, it is very easy
      to overlook helper functions that happens to lie in the
      `swh.storage.algos` package. To make it slightly easier to find
      those, add some “see also” section for listing directory entries,
      branches, origin visits and origin visit statuses.
      3f08b6d6
  13. Sep 25, 2023
  14. Sep 22, 2023
  15. Sep 20, 2023
  16. Sep 19, 2023
  17. Sep 12, 2023
  18. Sep 11, 2023
  19. Sep 06, 2023
    • David Douard's avatar
      replayer: add a --known-missmatched-hashes argument to the replay command · 7d16b630
      David Douard authored
      This accepts a file of swhids of objects that are known to be invalid
      (hash mismatch) but should be replayed anyway (typically because they do
      exist as is in the original storage).
      
      The file is expected to have rows like:
      
        swh:1:xxx:<invalid_hex_hash>,<expected_hex_hash>
        [...]
      
      Note that the cli only accepts swhids in the exception file, while the
      backend (ModelObjectDeserializer) support all HashableObject. But we
      currently do not need this feature on the cli tool for other object
      types, and doing it this way is simpler in terms of type annotation.
      7d16b630
    • David Douard's avatar
      postgresql: Reduce risks of spurious concurrency insertion issues in directory_add · 250177da
      David Douard authored
      The idea is that 2 workers may insert similar directories concurrently,
      thus attempt to create identical DirectoryEntry objects in concurrent
      transactions, making one of the 2 transaction fail at commit time with
      a UniqueViolation error.
      
      But since rows in a `directory_entry_xxx` table consist only on the
      triplet `(target, name, perms)` and we run the db in read committed
      isolation level, when the next query (filling the `tmp_directory`
      table) in `swh_directory_entry_add()` sql function is executed, the
      insertion of conflicting rows from other transactions has been
      committed and is now visible in this transaction, so these conflicts
      can be simply ignored.
      
      Upgrade db version to 190.
      250177da
  20. Sep 05, 2023
  21. Sep 04, 2023
  22. Sep 01, 2023
  23. Aug 31, 2023
  24. Aug 30, 2023
  25. Aug 29, 2023
  26. Aug 21, 2023
    • Jérémy Bobbio (Lunar)'s avatar
      Add StorageInterface.skipped_content_find() · e2aad696
      Jérémy Bobbio (Lunar) authored
      To create recovery bundle, `swh-alter` needs to be able to retrieve
      full SkippedContent objects from the storage.
      
      The new method `skipped_content_find()` allows to retrieve all
      SkippedContent objects matching a given set of hashes. Usually, this
      should only be one, but multiple objects might be returned in case of
      hash collisions.
      
      While implementing this, swh-storage#4693 was identified which prevent
      testing the implementation with the PostgreSQL storage in the case
      a SkippedContent references a known origin.
      
      Thanks to olasd and vlorentz for the reviews and suggesting small
      improvements.
      e2aad696
  27. Aug 10, 2023
Loading