commit | 0f0c6fcd0d2f6f7d98f1de51616de274f277ede0 | [log] [tgz] |
---|---|---|
author | Ben Keller <galbanum@google.com> | Sat Apr 27 03:09:32 2024 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Sat Apr 27 03:09:32 2024 +0000 |
tree | 0b35cf34ffa4509445fc82d8b26d97a5fbfc13fb | |
parent | 55f4ba3ccfe681a9c3769830e2b2f80a14d211de [diff] |
[pkg] Do not open blobs to check for presence During resolves, after the meta.far is fetched, when checking to see if a content blob or subpackage meta.far needs to be downloaded, pkg-cache tries to open the blob. This is not correct, because on c++blob READ connections to partially written blobs keep the blob alive even after the writer closes its connection, which creates the following race condition: 1. blob is partially written by a concurrent resolve 2. blob is opened to check for presence 3. concurrent resolve hits an error and retries the fetch, which attempts to open the blob for write, which fails Local Storage has said that ReadDirents on /blob for both c++blob and fxblob is guaranteed to return blobs if and only if they are fully written and do not have outstanding deletion requests, this CL removes the open double check and relies only on ReadDirents to determine which blobs are missing. Fixed: 337104426 Change-Id: I20365520f8d4b01e26cce9a900db7ec9a2b93914 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1037588 Reviewed-by: Sen Jiang <senj@google.com> Commit-Queue: Ben Keller <galbanum@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.