Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-88944

Use something better than the GlobalLock to protect storage engine access

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution

      The GlobalLock is supposed to synchronize operations from accessing the storage engine during shutdown and rollback, as those are the only places where a Global X lock is taken.

      Unfortunately, this is not enforced, respected, or sufficient in all code paths. These bugs were all caused by operations accessing the storage engine without a lock:

      In these cases, we were holding onto storage engine resources in an uninterruptible state without a lock:

      In addition to those problems, the lock is a bit heavy-handed for a very infrequent event.

      Ideally, we would do the following:

      • On shutdown and rollback, kill all operations
      • Allow operations to run to completion as long as they are interruptible
      • Operations that can block for indefinite periods of time must do so in an interruptible state
      • Operations can always safely perform some non-blocking rollback after being killed

            Assignee:
            Unassigned Unassigned
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: