- Mar 10, 2024
-
-
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.
-
- Mar 08, 2024
-
-
Pierre-Yves David authored
If the inherited branch cache is dirty, it will be written on disk, and the super-set did not need to modify it, the on disk value for the subset will be re-useable as is. So the super set does not needs to write the very same content itself.
-
Pierre-Yves David authored
This would catch cases where copy is used for something else if any existed.
-
- Mar 09, 2024
-
-
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.
-
- Mar 08, 2024
-
-
Pierre-Yves David authored
This is more consistent with the logic we use for other object and it open the way to a clearer management of the cache state. Now, cache are created clean, cache update mark them dirty, writing them on disk mark them clean again.
-
Pierre-Yves David authored
This way, we can guarantee a valid subset has been written before touching the branchmap of another filter. This is especially useful as we are bout to start deleting outdated branchmap file.
-
Pierre-Yves David authored
This currently does not happens and it will be simpler that is remains that way. If all update do something, we will be able to simply declare, in a later changesets, that all update to result in a dirty branchcache.
-
- Mar 07, 2024
-
-
Pierre-Yves David authored
The repoview class is not intended to be used for unfiltered repository.
-
- Feb 28, 2024
-
-
Pierre-Yves David authored
This filtering was introduced in 74c004a515bc, however there is already no warning in that changeset. So I guess the warnings existed when we the patch was created but the problem was solved in another changeset that 74c004a515bc, rebased on.
-
Pierre-Yves David authored
There is only two important things in this test: - the number of file we send, to show we picked the obsstore. - the resulting state, to show we did alter things in the process. The rest are of the number are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
-
Pierre-Yves David authored
There is only two important things in this test: - the number of file we send, to show we picked the phase roots. - the resulting phases, to show we did not modified them. The rest are of the number are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
-
Pierre-Yves David authored
The important things to test here is the number of file included (to catch that the bookmark file was sent). So we keep that part non glob'ed but glob the rest. The glob'ed numbers are very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol.
-
Pierre-Yves David authored
It seems useful to very that the clone did not result in a corrupted copy.
-
- Mar 08, 2024
-
-
Pierre-Yves David authored
These case are fine as is, but as we are adding title to all the other as we simplify them, lets add title for all cases.
-
- Feb 28, 2024
-
-
Pierre-Yves David authored
Here, we just want to check if the streaming clone is allowed and used or not. We do not care about the details of the clone itself.
-
Pierre-Yves David authored
Here we just care about the fact the background file closing logic actually ran. We don't need to check the details of the cloning. The details of the output is very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol. So we filter it out.
-
- Mar 08, 2024
-
-
Pierre-Yves David authored
To check that --uncompressed is an alias we just need to check it trigger a stream clone, we don't need to check anything else.
-
Pierre-Yves David authored
That pattern is nice, but it prevent us to glob the number of bytes when we don't care about them. We don't care about them more often that what we currently checks so dropping this pattern will help use to simplify various tests.
-
- Feb 28, 2024
-
-
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.
-
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.
-
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.
-
- Mar 11, 2024
-
-
Pierre-Yves David authored
We let such instantiation slip in a previous commit, so we add an explicit check to prevent it to happen in the future.
-
- Mar 07, 2024
-
-
Pierre-Yves David authored
The repoview class is not intended to be used for unfiltered repository.
-
- Feb 26, 2024
-
-
Pierre-Yves David authored
Same rational: this will help having format variants.
-
Pierre-Yves David authored
Same rational: this will help having format variants.
-
Pierre-Yves David authored
This will help changing header parsing in format variants.
-
Pierre-Yves David authored
Gratuitous change to help code readability.
-
Pierre-Yves David authored
We are about to have more similar function, we rename the existing one to a more meaningful name and mark it private in the process.
-
- Feb 25, 2024
-
-
Pierre-Yves David authored
This prepare the introduction of more variant of cache.
-
- Feb 27, 2024
-
-
Pierre-Yves David authored
We keep the files and bytes output for the first call, but then we mostly check that we are being served a stream-clone bundle, not the actual content and size of the bundle. That aspect being tested by the stream clone test themselves.
-
- Feb 25, 2024
-
-
Pierre-Yves David authored
This have been around for ten years, so we can safely that this method have few callers. However I am about to add one.
-
- Jan 08, 2024
-
-
Pierre-Yves David authored
-
- Feb 25, 2024
-
-
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
-
- Feb 26, 2024
-
-
Pierre-Yves David authored
The code useful only to the local brancache have now been moved into the dedicated subclass. This will help improving the branchcache code without subtle breaking the remote variants.
-
- Feb 25, 2024
-
-
Pierre-Yves David authored
This will help define a clear boundary between the two.
-
- Feb 19, 2024
-
-
Pierre-Yves David authored
We copy some internal attribute along too. This should prevent inconsistency in the resulting branchmap.
-
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.
-
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.
-
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.
-
- Jan 19, 2024
-
-
Pierre-Yves David authored
Explicit is better and will give use more flexibility for future evolution of the storage.
-