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

MODE-2216 Fixed the potential corruption of the workspace cache during concurrent modification of the same nodes. #1138

Merged
merged 1 commit into from Jun 2, 2014

Conversation

hchiorean
Copy link
Member

With the previous code, multiple session writers of the same nodes could cause a "transient" (local) change to be loaded in the workspace cache during the persistChanges call. This because changed nodes are cleared asynchronously from the workspace cache which is not subject to ISPN locking.

The solution was to use a "transient" workspace cache during the persistChanges call, which always contains the latest ISPN stored data after locks have been successfully obtained.

…g concurrent modifying of the same nodes. With the previous code, multiple session writers of the same nodes could cause a "transient" (local) change to be loaded in the workspace cache during the persistChanges call. This because changed nodes are cleared asynchronously from the workspace cache which is not subject to ISPN locking.

The solution was to use a "transient" workspace cache during the persistChanges call, which always contains the latest ISPN stored data after locks has been successfully obtained.
@rhauch
Copy link
Contributor

rhauch commented Jun 2, 2014

Nicely done. I'll build locally and if successful will merge into 'master'. Will we need a different PR for '3.x'?

@hchiorean
Copy link
Member Author

@rhauch: yes, a separate PR is required for 3.x/3.8.x.... This is because there are significant differences especially in the WorkspaceCache class.

rhauch added a commit that referenced this pull request Jun 2, 2014
MODE-2216 Fixed the potential corruption of the workspace cache during concurrent modification of the same nodes.
@rhauch rhauch merged commit 03fcc2e into ModeShape:master Jun 2, 2014
@hchiorean hchiorean deleted the MODE-2216 branch June 3, 2014 06: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
2 participants