-
Improvement
-
Resolution: Fixed
-
Critical
-
None
-
None
Performances of concurrent editing in Magnolia is highly affected of the global sinchronization on ExclusiveWrite, expecially due to the usage in SaveHandlerImpl.
ExclusiveWrite was more a quick and dirty hack than a solution to concurrency implemented years ago. The main reason why it's bad is that is global: no matter which node you are saving or which repository you are working on, you will hold a lock which will block any other dialog from saving. That means that also saving a document to the dms or anything else into the data module is actually locking the whole system for editing.
A second reason why it's bad: it has totally no effect on clustered instances, since it's local to a single Magnolia instance. IF the problem it's trying to fix is concrete, synchronization should be done on a repository level, not at instance level.
A good approach would be using jcr locks on nodes (locking works also with a clustered repository).
Since Magnolia actually uses a "soft locking" approach everywhere, by allowing concurrent editing assuming that concurrent save operation on the same node would be really limited, my suggestion is to simply get rid of the synchronization block in SaveHandlerImpl, without introducing addictional checks at the moment.
- is related to
-
MGNLFORUM-234 Remove synchronized(ExclusiveWrite.getInstance()) in DefaultForumManager
- Closed
-
MAGNOLIA-3963 core: clean up InterceptFilter
- Closed