Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/791
@aledsage very good questions!
I agree it's best to propagate the exception if it happens - if it's due to
a scenario like (1) where the FS can't guarantee the sync, then it's the wrong
filesystem for doing persistence. A retry is probably a good idea - have added
one in latest commit, deliberately keeping it very simple, to avoid possibly
introducing other issues. Let me know what you think.
I had a look at testing this but can't think of a way to do it easily.
You'd either have to have a file system that you could force to fail `sync` on
demand (something using FUSE?), or mock out the `sync` itself - I looked into
using a dynamic proxy, but `FileDescriptor` is `static final` so not suitable
for proxying. Would be glad of any suggestions.
---
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.
---