-
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
Remote cache + disk cache requests incorrect action keys #8052
Comments
The @buchgr I think one possible fix would be to factor out the file access logic in |
@buchgr any thoughts here? It would be nice if we could get a fix in for 0.26.0 if possible |
@ishikhman can you take care of this please? |
yep, will have a look |
@aherrmann yep, that's a bug in Combined cache. I'd suggest another approach to fix this. I'll create a PR in the next days. |
That's problematic because it would require us to do two copy operations instead of a move. I think instead the simplification that would make the most sense is to merge |
@ishikhman Thanks for looking into this. For details on why the implementation uses inheritance instead of composition see #7512 (review) #7512 (comment) #7512 (comment) |
@buchgr @aherrmann thanks for getting me up-to-date with the implementation details! I see what you mean, but I still believe that composition can be easily used here - we do not have to delegate everything, right? So we could keep almost everything that has been implemented initially, just changing the call chain a bit. Let me show you the draft: #8141 |
FYI: the changes are in master and will be included into 0.27 |
Do we need a patch release for 0.25 as well? |
No we don't. This is not a regression as it never worked before :(.
*Von: *Dmitry Lomov <[email protected]>
*Datum: *Do., 9. Mai 2019, 14:24
*An: *bazelbuild/bazel
*Cc: *Jakob Buchgraber, Mention
Do we need a patch release for 0.25
… <#7498> as well?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8052 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKS5E3DEFVBAXFAR4BSXPTPUQJZHANCNFSM4HGDU54A>
.
|
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
@ishikhman did this change also fix the issue mentioned somewhere else where you had to have --remote_upload_local_results=true to write to the disk cache? |
FYI this was cherry picked #7499 (comment) |
@keith if you mean #8216 then unfortunately no. Is that the issue you were referring to? |
Ah yes. Thanks for the link.
…--
Keith Smiley
On May 9, 2019, at 08:20, Ira Shikhman ***@***.***> wrote:
@ishikhman did this change also fix the issue mentioned somewhere else where you had to have --remote_upload_local_results=true to write to the disk cache?
@keith if you mean #8216 then unfortunately no. Is that the issue you were referring to?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes #8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in #8052 and the root cause is described in [this](#8052 (comment)) and [this](#8052 (comment)) comments. Closes #8141. PiperOrigin-RevId: 247387377
Fixes bazelbuild#8052 The problem: CombinedCache is not working. The cause: both `OnDiskBlobStore` and `HttpBlobStore` store action results differently from other actions, but not in the same way. The `OnDiskBlobStore` appends "ac_" prefix to the key, while the `HttpBlobStore` stores it in a different directory. Current implementation added "ac_" prefix for both blob stores, which is not correct for the `HttpBlobStore`. The solution: treat actionResults' `gets` and `puts` in accordance with a particular Blob Store used. The problem is described in bazelbuild#8052 and the root cause is described in [this](bazelbuild#8052 (comment)) and [this](bazelbuild#8052 (comment)) comments. Closes bazelbuild#8141. PiperOrigin-RevId: 247387377
Description of the problem / feature request:
Using bazel 0.25.0rc2 with the new remote + disk cache feature #7512 the cache requests to the remote server are prefixed with
ac_
when they should be the sha of the object being requested.If the remote cache you're using validates this, it can result in a cache miss when it shouldn't.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Where the remote cache is https://github.com/buchgr/bazel-remote
In this case you get many warnings:
Since the cache is validating the format of the keys.
What operating system are you running Bazel on?
macOS
What's the output of
bazel info release
?release 0.25.0rc2
Have you found anything relevant by searching the web?
The warning is coming from this logic: https://github.com/buchgr/bazel-remote/blob/8811a77bfd9f8a35e4c23e758c9c585edb76283d/server/http.go#L62-L67
The text was updated successfully, but these errors were encountered: