[
https://issues.apache.org/jira/browse/MRESOLVER-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607536#comment-17607536
]
Tamás Cservenák edited comment on MRESOLVER-264 at 9/21/22 6:31 AM:
--------------------------------------------------------------------
When single host involved (so single JVM with MT or multiple JVMs with MT) this
tool can reliable verifiy advisory file locking:
[https://github.com/apache/maven-resolver/commit/9ca3751daea8c492ee661022862fdaeea7d230af]
If this tool passes with "OK" result on volume where you plan to host local
repository, resolver file locking will work. Again, this is usable on "single
host"! In case of distributed file systems, it is still recommended to use some
external synchronization like Hazelcast/Redis...
Rewording: most modern OSes support advisory file locking just fine (majority
of Maven deploys on workstations). There most probably are cases (like
LustreFS) but I consider those really minority (how many Maven on LustreFS
users are out there?).
In a moment you have a shared file system (ie. NFS) across multiple hosts, most
probably file locking will NOT work for you.
was (Author: cstamas):
When single host involved (so single JVM with MT or multiple JVMs with MT) this
tool can reliable verifiy advisory file locking:
[https://github.com/apache/maven-resolver/commit/9ca3751daea8c492ee661022862fdaeea7d230af]
If this tool passes with "OK" result on volume where you plan to host local
repository, resolver file locking will work. Again, this is usable on "single
host"! In case of distributed file systems, it is still recommended to use some
external synchronization like Hazelcast/Redis...
> Make file-lock the default locking
> ----------------------------------
>
> Key: MRESOLVER-264
> URL: https://issues.apache.org/jira/browse/MRESOLVER-264
> Project: Maven Resolver
> Issue Type: Task
> Components: Resolver
> Reporter: Tamás Cservenák
> Assignee: Tamás Cservenák
> Priority: Major
>
> Default locking in Resolver is RW locks, that is only in-JVM (so covers the
> multi threaded case). Simply, if users use Maven concurrently from different
> terminal windows, they still can end up with corrupted local repository.
> Hence, IMHO the default should be {{{}file-lock{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)