Skip to content
Snippets Groups Projects
  1. Feb 13, 2025
  2. Feb 05, 2025
    • Antoine Lambert's avatar
      cassandra: Improve snapshot_count_branches performance · 87ae723c
      Antoine Lambert authored
      It has been observed calling that method can lead to cassandra
      query timeout when a snapshot contains a large amount of branches.
      
      The performance bottleneck seems to be the use of a custom cassandra
      aggregate function computing the number of branches per target type.
      
      Removing the use of that function and performing the aggregation
      client side significantly improves query performance and makes
      the timeout issue goes away.
      
      Fixes #4719.
      87ae723c
  3. Jan 14, 2025
  4. Dec 16, 2024
  5. Dec 11, 2024
  6. Nov 27, 2024
  7. Nov 26, 2024
  8. Nov 08, 2024
  9. Nov 05, 2024
    • vlorentz's avatar
      tests: Fix incorrect swh_storage fixture setups · 9d9d44c7
      vlorentz authored
      The storage returned by swh_storage() must be either the same as swh_storage_backend(), or
      be a chain of proxies to it. This allows tests to act on the backend using methods
      not available on proxies or the RPC
      9d9d44c7
  10. Oct 31, 2024
  11. Oct 30, 2024
  12. Oct 11, 2024
  13. Sep 25, 2024
  14. Aug 27, 2024
  15. Aug 09, 2024
  16. Jul 22, 2024
  17. Jul 08, 2024
  18. Jun 28, 2024
  19. Jun 06, 2024
    • Jérémy Bobbio (Lunar)'s avatar
      Warn when objects are still buffered during shutdown · a84d9e47
      Jérémy Bobbio (Lunar) authored
      It is fairly easy to overlook calling `storage.flush()` after adding
      some objects just before the end of a process. In a direct
      configuration, everything will be fine but if a buffering proxy is
      configured, this means that the objects still in the buffers are going
      to be lost. Let’s add a warning if this is the case.
      a84d9e47
    • Nicolas Dandrimont's avatar
      postgresql: do not remove shared entries in the `snapshot_branch` table · 751634c9
      Nicolas Dandrimont authored
      When deleting a snapshot, deletion removed the corresponding entries in
      the `snapshot_branch` table. These entries are shared between
      snapshots (e.g. all snapshots with a `HEAD` pointing to `refs/heads/main`
      share the same line in this table), and we don't keep a reverse index to
      efficiently remove orphan lines, so we just skip the removal altogether.
      
      Add a test to ensure that the corruption doesn't happen anymore.
      751634c9
  20. Jun 05, 2024
    • Jérémy Bobbio (Lunar)'s avatar
      Support removal of RawExtrinsicMetadata and ExtID objects · a20f399d
      Jérémy Bobbio (Lunar) authored
      These changes are needed to allow `swh alter remove` to remove
      RawExtrinsicMetadata and ExtID objects from the PostgreSQL and Cassandra
      implementation of the storage.
      
      As RawExtrinsicMetadata objects can be addressed using an
      ExtendendSWHID, they can now be removed using `object_delete()`.
      
      For ExtID, a new method `extid_delete_for_target()` has been added to
      `ObjectDeletionInterface`. It will remove any ExtID object targeting one
      of the object in the a list of SWHID given as an argument.
      
      Address swh-alter!11
      a20f399d
    • Jérémy Bobbio (Lunar)'s avatar
      Fix transaction usage in postgresql.object_delete() · 5d3992ec
      Jérémy Bobbio (Lunar) authored
      The cursor provided by the `@db_transaction` decorator was not
      being passed properly.
      5d3992ec
  21. Jun 04, 2024
    • Nicolas Dandrimont's avatar
      Make the blocking/masking admin configs compatible with the swh db utilities · 5dadcfd4
      Nicolas Dandrimont authored
      To be able to use the `swh db` command line, the configurations need to
      have the following shape:
      
      <toplevel key>:
        cls: postgresql
        db: <postgresql DSN>
      
      The usage of `blocking_db` and `masking_db` instead of plain `db`, and
      lack of overridability in the swh db utilities, made schema migrations
      more annoying than necessary.
      
      The old configuration key still works but raises a Deprecation warning.
      
      The configuration of the proxies themselves is unchanged, as having a
      differently-named key for the proxy-specific database makes sense to
      avoid confusion.
      5dadcfd4
  22. Jun 03, 2024
Loading