GWphua opened a new pull request, #19424:
URL: https://github.com/apache/druid/pull/19424

   
   This PR updates the Docker image build to use locked BuildKit cache mounts 
for the Maven local repository.
   
   The Dockerfile already uses `RUN --mount=type=cache,target=/root/.m2` to 
reuse Maven dependencies across image builds. By default, BuildKit cache mounts 
are shared, which allows multiple concurrent builds to write to the same Maven 
cache at the same time. Maven’s local repository is not a good fit for 
concurrent writers, so parallel Docker builds can corrupt or partially write 
cached artifacts.
   
   This PR changes both Maven cache mounts to use `sharing=locked`, causing 
concurrent builds that use the same `/root/.m2` cache to wait for the active 
writer to finish before reusing the cache.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `distribution/docker/Dockerfile`
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items apply to every PR. Remove the items which are not done or 
not relevant to the PR. None of the items from the checklist below are strictly 
necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   
   - [x] been self-reviewed.
   - [x] been tested in a test Druid cluster.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to