Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#935 #1024

Merged
merged 1 commit into from
Jul 15, 2014
Merged

Issue#935 #1024

merged 1 commit into from
Jul 15, 2014

Conversation

d-ell
Copy link
Contributor

@d-ell d-ell commented Jul 12, 2014

Incoming Jenkins testrun:
https://jenkins.catrob.at/view/All-Categories/view/Catroid-multi-job/job/Catroid-Multi-Job-Custom-Branch/1937/

Process How Files are getting saved (in order to avoid data loss):
You have 3 steps. During/Before/After the first 2 steps (The renaming should be atomic on Linux/Android) an error can occur, this will be checked within the SanityCheckFunction().

-- Filestate: code.xml

  1. Write to tmp_code.xml
    -- Filestate: code.xml tmp_code.xml
  2. Delete code.xml
    -- Filestate: tmp_code.xml
  3. (usually atomic) rename tmp_code.xml --> code.xml
    -- Filestate: code.xml

To make things clearer:
SanityCheckFunction only needs to verify 2 states.

Either tmp_code.xml AND code.xml exist:
-Then it has to delete tmp_code.xml as this state only occurs during/after step 1 and before step 2.
Or only tmp_code.xml exists
-then it has to rename tmp_code.xml to code.xml. This state can only occur after step 2 but before step 3.

@aried3r

@@ -432,15 +509,13 @@ public File copySoundFile(String path) throws IOException, IllegalArgumentExcept
File outputFile = new File(buildPath(soundDirectory.getAbsolutePath(),
inputFileChecksum + "_" + inputFile.getName()));

return copyFileAddCheckSum(outputFile, inputFile, soundDirectory);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the 3rd parameter was marked as unused, I traced it and there was no usage of it

@aried3r
Copy link
Contributor

aried3r commented Jul 14, 2014

Please rebase and squash into one commit.

* New Writing Process: 1. Write to tmp_code.xml 2. Delete code.xml 3. (usually atomic) rename tmp_code.xml --> code.xml
* New SanityCheck for saveProject, loadProject
* Solved Locking issue with xstream
* Solved 3 fails in Speakbricktest + 1 test in utilstest
@aried3r aried3r modified the milestone: 1.0 - Google Play Release Jul 15, 2014
@aried3r
Copy link
Contributor

aried3r commented Jul 15, 2014

LGTM, this should be the last blocking issue before 0.9.9, right?

ping @stypen @sjaindl

aried3r added a commit that referenced this pull request Jul 15, 2014
@aried3r aried3r merged commit 4b1a881 into master Jul 15, 2014
@aried3r aried3r deleted the issue#935 branch July 15, 2014 20:28
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.

2 participants