Github user geomacy commented on the issue:

    https://github.com/apache/brooklyn-server/pull/791
  
    You're right @ahgittin, the `sync` should be done before the `close`; I 
have added another commit to do this.
    
    I agree I'm not sure that the problem was caused by a failure to commit 
data to disk when @aledsage's laptop crashed, but it's certainly plausible.  
That's an interesting link you shared above.  I've done a bit more digging and 
come across a very interesting email here:
    
    https://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html
    
    It's definitely worth reading; in short, it looks like just adding the 
`sync()` in Brooklyn, while it may help, isn't in itself enough to _ensure_ the 
data is committed to disk on pretty much any system, not just OSX.  :-(  
    
    In fact the JNI call that you referred to on OSX seems to be the only way 
to guarantee the data is committed, and of course it's only available on the 
Mac.
    
    I think this PR may still be something worth doing (it will eliminate one 
failure point, by ensuring the data is flushed from host memory to the disk 
device).  I don't know what else we might want to do to take this further, 
would be interested to hear what you think.
    
     


---

Reply via email to