You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org> on 2010/06/21 10:54:25 UTC
[jira] Created: (SYNAPSE-664) Make the
MultiXMLConfigurationSerializer More Reliable
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-664) Make the
MultiXMLConfigurationSerializer More Reliable
Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
[ 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Resolved: (SYNAPSE-664) Make the
MultiXMLConfigurationSerializer More Reliable
Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka resolved SYNAPSE-664.
-----------------------------------------
Resolution: Fixed
Fixed on the trunk
> 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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org