Skip to content

Conversation

@jdillon
Copy link
Contributor

@jdillon jdillon commented Jan 9, 2016

WIP, this does not yet pass tests due to one test explicitly assuming the tmpfile should remain on failure. Pending some use-case why this is good or desired.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also should be verified to ensure sanity

@cstamas
Copy link
Contributor

cstamas commented Jan 20, 2016

AFAIR, the reason in NX2 to leave tmp file in place was for easier recovery. Did not find any direct proof of this decision, but these are IMHO related issues:
https://issues.sonatype.org/browse/NEXUS-5584
https://issues.sonatype.org/browse/NXCM-5302
https://issues.sonatype.org/browse/NXCM-4371

AFAIR, NX2 had a problem to kill some config files (staging.xml in this case), leaving 0 byte file in place, making it impossible to recover (with or without human intervention). Hence, we opted to leave tmp files as is to at least make human intervention possible/easier.

@jdillon
Copy link
Contributor Author

jdillon commented Jan 20, 2016

@cstamas isn't that why we built the replacer, so that the new file wouldn't corrupt the old file. If we failed to write the new file, or failed to replace the new file, wouldn't the internal state be corrupted anyways?

@cstamas
Copy link
Contributor

cstamas commented Jan 21, 2016

@jdillon yup, that is what I remember too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants