[
https://issues.apache.org/jira/browse/IO-707?focusedWorklogId=542950&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-542950
]
ASF GitHub Bot logged work on IO-707:
-------------------------------------
Author: ASF GitHub Bot
Created on: 27/Jan/21 17:31
Start Date: 27/Jan/21 17:31
Worklog Time Spent: 10m
Work Description: garydgregory commented on pull request #192:
URL: https://github.com/apache/commons-io/pull/192#issuecomment-768449132
Hm... it seems to me that _any_ file operation in an app (through Commons IO
or otherwise) is always at risk of being "out-of-sync" or simply subverted by
another process or user doing some operations on disk, so this is going to be
confusing at best. For example, let's say I perform some Commons IO file
operation, then the JVM or GC pauses my thread for a "long" time, during which
something happens on disk which violates my app's expectations once it wakes
up... now what?
If the pause happened before the assert, the assert catches something... if
it happens after, I know nothing and my app calling Commons IO _still_ needs to
handle the situation, assert or no assert. I'm just worried that we are cherry
picking a few places to add asserts that might not be useful and will cause
users to ask why asserts are here but not there, and so on... looking f/w to
thoughts from the community...
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 542950)
Time Spent: 0.5h (was: 20m)
> Add optional early error detection as postcondition check
> ---------------------------------------------------------
>
> Key: IO-707
> URL: https://issues.apache.org/jira/browse/IO-707
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 2.8.0
> Reporter: Boris Unckel
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The current version does not include an optional way to detect errors with
> the underlying filesystem and/or logic early.
> Due to performance reason and/or design decision, the result of delete or
> create directories/files does not include a check wheter the delete or create
> was successful. It "only" relies on trust to the underlying operations of the
> JDK and/or the completeness of own unit tests.
> To have the option to check things, without having additional commons-io
> proprietary options and without a performance impact for regular operations
> the Java 1.4 keyword "assert" should be used.
> Current project profits in case of detail analysis. Downstream projects
> having own unit tests for IO will profit.
> PR with proposal will follow.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)