Skip to content
Snippets Groups Projects
  1. Sep 28, 2018
    • Antoine Lambert's avatar
      algos.dir_iterators: Implement iterator protocol in DirectoryIterator · 2eced78d
      Antoine Lambert authored
        - add Python iterator protocol support in the DirectoryIterator class in
          order to easily visit in a recursive way any directory stored in the
          archive.
      
        - add convenient function dir_iterator wrapping the instantiation of
          the DirectoryIterator class
      
        - add tests
      
      Related T1177
      2eced78d
    • Antoine Lambert's avatar
      algos.dir_iterators: Fix handling of empty directory · 9adaed70
      Antoine Lambert authored
      Two issues found regarding the way empty directories were handled:
      
        - _empty_dir_hash variable did not have correct type (str instead of
           bytes) so empty directory test based on hash comparison was
           always failing
      
        - in the step method of DirectoryIterator, no need to push a new
          frame for an empty directory as this will stop the iteration
      9adaed70
  2. Sep 25, 2018
  3. Sep 19, 2018
  4. Sep 07, 2018
  5. Sep 06, 2018
  6. Sep 05, 2018
  7. Aug 02, 2018
  8. Jul 27, 2018
  9. Jun 05, 2018
    • Nicolas Dandrimont's avatar
      Migrate away from temporary tables for read queries · a1679604
      Nicolas Dandrimont authored
      Summary:
      To do so, we import a function from a recent version of psycopg2,
      execute_values, which can execute queries efficiently with a list of values.
      
      We also scale the cursor back from having things in SQL functions towards having
      things inside the db.py database "backend". This will make it easier to iterate,
      as we won't have to deploy function changes to twenty different databases.
      
      After these changes, testing the web UI on a physical replica works.
      
      Close T1073
      
      Test Plan:
      Local integration tests are happy; Navigating the frontend backed by
      a physical replica seems to be okay now.
      
      Reviewers: #reviewers!
      
      Maniphest Tasks: T1073
      
      Differential Revision: https://forge.softwareheritage.org/D340
  10. Jun 04, 2018
  11. May 30, 2018
  12. May 29, 2018
  13. May 28, 2018
  14. May 24, 2018
  15. May 12, 2018
  16. May 11, 2018
  17. May 09, 2018
  18. May 07, 2018
  19. Apr 25, 2018
  20. Mar 12, 2018
  21. Feb 27, 2018
  22. Feb 20, 2018
    • Antoine Lambert's avatar
      storage: Add methods to compute directories/revisions diff · d8ad992d
      Antoine Lambert authored
      This commit adds the implementation of an efficient algorithm for comparing
      two directory trees in order to compute the list of introduced file changes
      in terms of addition / deletion / modification/ renaming.
      It can be found in the diff module located in the new namespace
      swh.storage.algos
      
      That algorithm is used to extend the storage API with the following methods:
      
        - diff_directories: compute diff between two arbitrary directories
        - diff_revisions: compute diff between two arbitrary revisions
        - diff_revision: compute diff between a revision and its first parent
      
      Related T921
      
      Closes D295
  23. Feb 19, 2018
    • Nicolas Dandrimont's avatar
      Add a new table for "bucketed" object counts · 6b80cff8
      Nicolas Dandrimont authored
      This table allows counting objects by bucket, keeping the transactions for
      counting objects short (a few dozen seconds at most).
      
      Also add a "single_update" boolean field to the main object_counts table to be
      able to discriminate tables that are counted via buckets and tables counted on
      one go.
      
      The main table is updated every 256 counted buckets to avoid too much churn on
      the table.
      
      Close T962.
      6b80cff8
  24. Feb 09, 2018
  25. Feb 08, 2018
Loading