-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a cache system #75
base: main
Are you sure you want to change the base?
Conversation
The response of a request is cached and it is invalidated every time one of then packages of the new request is involve ind the differencies between the new opam commit and the old one(cached opam commit). Anytime the cached response is the same as the new response, we keep the old one for the oldest opam commits which are used.
b109239
to
d1120d4
Compare
Invalidate the cache when the new commit is older in the commit history.
3f230ca
to
ffe2df9
Compare
On addition to direct dependencies some transitive deps could also change between 2 commits of opam repository.
98ab919
to
ef0beba
Compare
This is too large for me to review (and seems to include a load of unnecessary reformatting). Could you say something about how it works and why it's correct? I would expect it to work like this:
I see all kinds of code here shelling out to Note: Putting the cache on the worker means it might not work so well with a cluster, since it's less likely the worker handling a request also handled the previous one. An alternative would be to send all the hashes back to ocaml-ci and let it do the check in one place. However, that puts more load on the single CI instance, so it might not be a good trade-off. |
With that we only re-solve a request if its packages are involve in the change of the opam-repository commits:
|
It could be interesting to have a node that distribute the requests among the solver-workers. Could we have that kind of config at the current structure (ocluster, ocluster-workers) ? |
* Same solution with different commit (is_same_solution). * Same commits have no changes.
The response of a request is cached and it is invalidated every time one of the packages of the new request is involve between the new opam commit and the old one (cached opam commit).
Anytime the cached response is the same as the new response, we keep the old one for the oldest opam commit.