Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/1616#issuecomment-51018958
  
    This uses 
[FileLock](http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileLock.html)
 as its locking mechanism.  According to those docs (emphasis mine),
    
    > Whether or not a lock actually prevents another program from accessing 
the content of the locked region is system-dependent and therefore unspecified. 
The native file-locking facilities of some systems are merely advisory, meaning 
that programs must cooperatively observe a known locking protocol in order to 
guarantee data integrity. On other systems native file locks are mandatory, 
meaning that if one program locks a region of a file then other programs are 
actually prevented from accessing that region in a way that would violate the 
lock. On yet other systems, whether native file locks are advisory or mandatory 
is configurable on a per-file basis. __To ensure consistent and correct 
behavior across platforms, it is strongly recommended that the locks provided 
by this API be used as if they were advisory locks.__
    
    Can you comment on whether this approach is safe if we're using advisory 
locks, and maybe add that comment to the source code?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to