[ 
https://issues.apache.org/jira/browse/SYNAPSE-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880758#action_12880758
 ] 

Hiranya Jayathilaka commented on SYNAPSE-664:
---------------------------------------------

Implemented the above mentioned safe strategy in MXCL.

> Make the MultiXMLConfigurationSerializer More Reliable
> ------------------------------------------------------
>
>                 Key: SYNAPSE-664
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-664
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: NIGHTLY
>            Reporter: Hiranya Jayathilaka
>            Assignee: Hiranya Jayathilaka
>             Fix For: 2.0
>
>
> Currently this is how the MultiXMLConfigurationSerializer (MXCL) saves the 
> configuration to the file system:
> 1. Backup the existing synapse-config directory
> 2. Create a new synapse-config directory and the necessary child directories
> 3. Serialize the configuration to the files (this can fail due to an IO error 
> - eg: running out of file handles in the system)
> 4. Delete the backup
> If step 2 or 3 fails, MXCL tries to restore the backup. But in most practical 
> scenarios, when IO operations fail, they fail in chunks. Therefore most of 
> the time, the restoration operation never succeeds. This can leave Synapse 
> with either no or partially done synapse-config directory. We can make the 
> process more reliable implementing the following strategy:
> 1. Create a temp directory
> 2. Serialize the entire configuration the temp directory (leave the original 
> synapse-config directory intact)
> 3. Once the serialization is completed move the temp directory as the new 
> synapse-config directory
> This way if something goes wrong during serialization, the original 
> synapse-config directory won't be affected.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to