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

[7.0] Fix server hang on creation of system.views

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.10
    • Affects Version/s: 7.0.8
    • Component/s: None
    • Labels:
      None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2024-04-15, CAR Team 2024-04-29
    • 28

      During the creation of system.views (created the first time a view is created in a database) a pre-commit hook, registered here, can be interrupted mid execution by a write conflict error, thrown here, crucially at a point where _pendingCommitNamespaces and _pendingCommitUUIDs were already updated, leaving the RAM contents of the catalog in an inconsistent state. Subsequent retries would fail indefinitely due to this inconsistency.

      The underlying problem lies on the fact that the hook is performing I/O. The hook is supposed to always succeed, and storage access cannot generally hold this assumption. The solution would be to avoid storage access during two-phase commit: since the collection is being created it must be empty, so we should just clear the in-memory representation of the views.

      Only affects 7.0.

            Assignee:
            josef.ahmad@mongodb.com Josef Ahmad
            Reporter:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: