Skip to content
Snippets Groups Projects
  1. Mar 10, 2024
    • Pierre-Yves David's avatar
      branchcache: stop writing more branchcache file on disk than needed · 2e8a88e5809f
      Pierre-Yves David authored
      Before this change, we were unconditionally writing a branchmap file for the
      filter level passed to `update_disk`. This is actually counter productive if no
      update were needed for this filter level. In many case, the branch cache for a
      filter level is identical to its parent "subset" and it is better to simply
      keep the subset update and reuse it every time instead of having to do identical
      work for similar subset.
      
      So we change the `update_disk` method to only write a file when that filter
      level differ from its parent. This removes many cases where identical files were
      written, requiring multiple boring update in the test suite.
      
      The only notable changes is the change to `test-strip-branch-cache.t`, this
      case was checking a scenario that no longer reproduce the bug as writing less
      branchmap file result in less stalled cache on disk.
      
      Strictly speaking, we could create a more convoluted scenario that create a
      similar issue. However the next changeset would also cover that scenario so we
      directly updated that test case to a "no longer buggy" state.
      2e8a88e5809f
  2. Mar 08, 2024
  3. Mar 09, 2024
    • Pierre-Yves David's avatar
      branchcache: stop using `copy(…)` in `replace(…)` · 659f766629c8
      Pierre-Yves David authored
      The `copy` method is mostly used for a filter level to inherit the branchmap
      from a subset. So we stop using (abusing) it in "replace" to ensure `copy` is
      used only for inheritance purposes.
      
      Since `replace` is a method of the BranchMapCache, it seems fine to do lower
      level operation there.
      659f766629c8
  4. Mar 08, 2024
  5. Mar 07, 2024
  6. Feb 28, 2024
  7. Mar 08, 2024
  8. Feb 28, 2024
  9. Mar 08, 2024
  10. Feb 28, 2024
    • Pierre-Yves David's avatar
      stream-clone-test: simplify the test for getbundle with stream=1 · b0d08bdc6a60
      Pierre-Yves David authored
      The core of this tests is about checking we receive a stream bundle with such
      request. We don't need to look at too much of the details of the stream itself.
      Since the content of the stream if shifting overtime, Such check is very
      fragile and consume a lot of time for little value when adjusting formats,
      caches, and protocol.
      
      So we reduce the size of what we check to focus on "is this a stream clone"
      question.
      b0d08bdc6a60
    • Pierre-Yves David's avatar
      stream-clone-test: factor some piece of basic clone test out · a72ab2ec5315
      Pierre-Yves David authored
      Multiple parts of this case (listing cache, checking error) are common to all
      cases and don't need to be in the conditionnal block.
      
      This simplify the test update.
      a72ab2ec5315
    • Pierre-Yves David's avatar
      stream-clone-test: simplify the case where server disabled it · 749e7685935a
      Pierre-Yves David authored
      We have an option to disable it, we don't need to test it with all protocol
      variants.
      
      In addition there is little value in looking at the bytes to bytes details of
      the reply. Such check is very fragile and consume a lot of time for little
      value when adjusting formats, caches, and protocol.
      749e7685935a
  11. Mar 11, 2024
  12. Mar 07, 2024
  13. Feb 26, 2024
  14. Feb 25, 2024
  15. Feb 27, 2024
  16. Feb 25, 2024
  17. Jan 08, 2024
  18. Feb 25, 2024
    • Pierre-Yves David's avatar
      branchcache: drop the unused `_verifyclosed` · 19b2736c8e45
      Pierre-Yves David authored
      This code appears dead since its introduction about 5 years ago in this three
      consecutive commits:
      
      - 6578654916ae → introduce the method with two calls
      - 7c9d4cf23adf → remove first call
      - be5eeaf5c24a → remove second call
      
      
          o  changeset:   be5eeaf5c24a
          |  user:        Pulkit Goyal <pulkit@yandex-team.ru>
          |  date:        Fri Apr 05 15:57:09 2019 +0300
          |  summary:     branchcache: don't verify closed nodes in _branchtip()
          |
          o  changeset:   7c9d4cf23adf
          |  user:        Pulkit Goyal <pulkit@yandex-team.ru>
          |  date:        Fri Apr 05 15:56:33 2019 +0300
          |  summary:     branchcache: don't verify closed nodes in iteropen()
          |
          o  changeset:   6578654916ae
          |  user:        Pulkit Goyal <pulkit@yandex-team.ru>
          ~  date:        Mon Apr 01 13:56:47 2019 +0300
             summary:     branchcache: lazily validate nodes from the branchmap
      19b2736c8e45
  19. Feb 26, 2024
  20. Feb 25, 2024
  21. Feb 19, 2024
    • Pierre-Yves David's avatar
      branchcache: fix the copy code · bb8612053547
      Pierre-Yves David authored
      We copy some internal attribute along too. This should prevent inconsistency in
      the resulting branchmap.
      bb8612053547
    • Pierre-Yves David's avatar
      branchcache: pass a "verify_node" attribut to __init__ instead of hasnode · 5515876173ba
      Pierre-Yves David authored
      The hasnode callback cannot be inherited and is dropped on copy, which seems
      like a bad idea. Instead we pass the actual semantic as a parameter and let the
      internal logic deal with it.
      5515876173ba
    • Pierre-Yves David's avatar
      branchcache: stop storing a repository instance on the cache altogether · fd30c4301929
      Pierre-Yves David authored
      We did not really needed it and we do not needs it anymore at all. So lets make
      things simpler for consistency and garbage collecting and stop storing it
      altogether.
      fd30c4301929
    • Pierre-Yves David's avatar
      branchcache: pass the target repository when copying · 3aba79ce52a9
      Pierre-Yves David authored
      Branchmap are usually copied to be used on a different repoview using a
      different filter level. Passing the repository around means the repository in
      `branchcache._repo` will drift from the actual branchmap filter.
      
      This is currently "fine" because the repo is only used to retrieve the `nullid`
      value. However, this is a fairly big trap for any extension or future code using
      the `_repo` attribute.
      
      The replace logic is now using a copy to ensure the right repository view is
      used to initialized the cached value.
      
      We add a couple of assert for make sure this inconsistency does not sneak back.
      3aba79ce52a9
  22. Jan 19, 2024
Loading