You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2020/09/11 19:33:00 UTC

[jira] [Commented] (DAFFODIL-2387) CLI: Delete infoset file if there is an error

    [ https://issues.apache.org/jira/browse/DAFFODIL-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194499#comment-17194499 ] 

Mike Beckerle commented on DAFFODIL-2387:
-----------------------------------------

If streaming is being used (-s option?) then I believe one should just leave the partial result file in place on failure. The partial result may be of value. I believe this being useful depends on a flush() of the output after each streamed element, but I'm pretty sure we're doing that. 

> CLI: Delete infoset file if there is an error
> ---------------------------------------------
>
>                 Key: DAFFODIL-2387
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2387
>             Project: Daffodil
>          Issue Type: Bug
>          Components: CLI
>            Reporter: Steve Lawrence
>            Priority: Minor
>              Labels: beginner
>
> The CLI -o option specifies an output file that Daffodil should write the infoset to (or unparse data to). If there is an error during parse/unparse (e.g. non-backtrackable parse error, SDE) this file is not deleted which can cause confusion. Especially since in some cases the file could have a partial infoset/data.
> We might want to consider deleting the output file that we create if there is an error to prevent possible confusion. Note that we need to be careful about when we delete it. For example, say the file already existed when we ran Daffodil. In this case Daffodil will truncate the file to zero bytes and then write the output. But if there is an error, do we want to delete it if it already existed? Or maybe we just leave it truncated it to zero bytes (I.e. should we delete a file we didn't create?)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)