elink21 commented on PR #23933: URL: https://github.com/apache/beam/pull/23933#issuecomment-1307893137
> It looks like it's not able to get a cache lock? That's a bit concerning since that's the bit of the build process getting modified here... Could someone please look into that? Hi @byronellis , it seems like the combination of GCP buckets features along with how Gradle Cache works should cover the possible race conditions, I'm listing the findings below: * Gradle Cache composes incremental builds based on layers coming from the inputs, in case an input change it will generate another entry, but there are not deletions or updates for the same key. * Remote Gradle Cache verifies that the current layer key doesn’t exist in the bucket before trying to build and upload. * Read-after-write and read-after-delete operations are already strongly consistent on GCP buckets. * Also, read and write are atomic operations when working with buckets. As the cache doesn’t perform delete operations or updates to the same key(object), the remaining possible race condition is when two workers are trying to push the same key if it doesn’t exist at the same time, in this case the last one will be effective, but if the key is the same then it shouldn’t be a problem since equal inputs generate equal keys, so it doesn’t matter which one is uploaded. * Old cache is only deleted through a lifecycle rule in the bucket. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
