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

Find a permanent solution to replace POC using remote to self inside catalog shard

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      See SERVER-64855 for the quick POC hack. The problem is that the direct client that could be used in the combined catalog shard fails because of multiple assertions - the session cannot be used, other transaction related fields are not allowed either. Switching to the RemoteShard with remote client to create a loopback is almost a solution, however the problem is that the catalog shard needs to read some data from config before it enables sharding state, which means it's not listening at the port yet.

      The hack in SERVER-64855 is using local shard before the sharding state is enabled and then switches to remote shard. It works but is racy because the check for sharding enabled flag before returning the shard instance might not be correct at the time the shard is used. We would love to replace this with more permanent solution.

      Invariants that fail when using direct client to access the config DB in catalog shard: in MongoDOperationContextSession constructor, in TransactionParticipant here and here, in ShardRemote here.

            Assignee:
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Reporter:
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: