Integrate 'checkCanServeReadsFor' and 'assertCanWrite_inlock' into ShardRole API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ReplicationCoordinator::checkCanServeReadsFor checks that the node is currently in a readable state. Callers of this method are required to either be holding locks or within a lock-free operation context. Read commands and getMore all call this method after having acquired AutoGet/ShardRoleAcquisition. Therefore, it would make sense to fold this check under the ShardRole API.

      Similarly, write_ops_exec::assertCanWrite_inlock is called on write commands (e.g. here). This could also be folded under the ShardRole API.

            Assignee:
            Unassigned
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: