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

Make PrimaryOnlyService remove an instance from its in-memory map if the instance fails to insert its state doc

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • Service Arch 2021-02-22, Service Arch 2021-03-08, Service Arch 2021-03-22, Service Arch 2021-04-05, Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31

      An instance can fail to insert its state doc because the instance conflicts with a running instance:

      In both cases, we have made the instance fail with ConflictingOperationInProgress.

      For now, we have made the command that creates the instance handle removing the instance from the in-memory map in this case, e.g. here.

      It would be better for the POS machinery to handle this. There are two options:

      • Make the instance remove itself from its service if the instance fails to insert its state doc. This requires instances to have a pointer to their service.
      • Make the service remove the instance if the instance fails to insert its state doc. This requires services to monitor what their instances complete with.

      suganthi.mani and I think the second option is cleaner.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: