-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
improve --experimental_local_disk_cache #4870
Comments
Actuall there are three options. The one you havn't mentioned: I agree with your suggestions. I can look into renaming the options and I agree that to lose "experimental" part is a good idea. I also started to look into adding upper bound size limit to local action cache. Surprisingly, Bazel doesn't have any means for now to do that (no LRU cache or similar). |
Why lock it?
…On Mon, 19 Mar 2018 at 13:04 David Ostrovsky ***@***.***> wrote:
Actuall there are three options. The one you havn't mentioned:
--experimental_strict_action_env. Without this options, the caches is
useless, if the workspace changed (clone project in two different
locations). See also discussion on the original issue where local action
cache was introduced.
I agree with your suggestions. I can look into renaming the options and I
agree that we lose experimental part is a good idea. I also started to look
into adding upper bound size limit to local action cache. Surprisingly,
Bazel doesn't have any means for now to do that (no LRU cache or similar).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4870 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF4Sgargwlf86MAnobdRBr5OxKHqoks5tf5CkgaJpZM4Sv7KB>
.
|
@davido good point, but --experimental_strict_action_env is not specific to the local disk cache. We should certainly document it. Yes, Bazel currently doesn't have that, but the remote module could just have it's own LRU cache that it keeps in memory while the server is running. That should be sufficient I think. @ittaiz Not a strict requirement, I just imagine it to be difficult to keep the LRU cache in sync with multiple Bazel's deleting from it concurrently. |
@davido would you want to work on this? 😃 |
@buchgr Yes, feel free to assign it to me. |
Fixes: bazelbuild#4870. Test Plan: $ bazel test src/test/shell/bazel:local_action_cache_test
Fixes: bazelbuild#4870. Test Plan: $ bazel test src/test/shell/bazel:local_action_cache_test
Fixes: bazelbuild#4870. Test Plan: $ bazel test src/test/shell/bazel:local_action_cache_test
Fixes: bazelbuild#4870. Test Plan: $ bazel test src/test/shell/bazel:build_cache_test
Should we also have it respect the |
Is there a timeline for this feature? |
@promiseofcake yes we should. @RNabel we love contributions :-) |
@davido There are a few of your commits referenced here -- are you still working on this? |
@RNabel There is a pending change for review: https://bazel-review.googlesource.com/c/bazel/+/53810. However, all this change does, is to consolidate already working local disk cache options. Gerrit Code Review projects is using this feature for many months now. See the documentation how to activate it (you can pick any paths): Moreover, in very recent Bazel version, I added the ability to specify
|
Many users like the
--experimental_local_disk_cache
option, but it needs some improvements.--experimental_local_disk_cache
and--experimental_local_disk_cache_path
with one--local_disk_cache=/path/to/disk/cache
.--local_disk_cache_size=SIZE
option to specify an upper bound on the folder. A LRU cache is probably fine. We'll probably need to introduce alockfile
to make sure only one Bazel server uses the cache at a time.cc: @davido
The text was updated successfully, but these errors were encountered: