Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2080

Use safer global lock during repository initialization

    Details

      Description

      The process ModeShape uses for ensuring that one RepositoryCache instance initializes the repository content is not as simple nor as safe as using JGroup's global lock service and made easier with the recently-added fork channels.

      Basically, each RepositoryCache instance should attempt to get the lock and once it gets the lock should check to see if the repository document can be found; if not, that instance should initialize the content.

      This will simplify the logic, especially since all subsequent RepositoryCache instances will immediately and sequentially start up without waiting or spinning. It is also safer, especially in the case where the first RepositoryCache instance crashes while being in the middle of initialization; in such cases, the lock it holds will be released, and the next RepositoryCache instance requesting the lock will receive it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hchiorean Horia Chiorean
                  Reporter:
                  rhauch Randall Hauch
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: