Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3905

Remove usage of ExclusiveWrite

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0
    • Component/s: core
    • Labels:
      None

      Description

      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.

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dlipp Daniel Lipp
                Reporter:
                fgiust Fabrizio Giustina
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    DoD