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

Remove ns field from DocID for rollback with UUIDs

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

      Currently in rs_rollback.h, we are maintaining the namespace of documents that are being rolled back through an insert/delete/update, in the DocID struct. This field is still necessary although we are refetching documents using the UUID because it is used in

       OldClientContext ctx(opCtx, doc.ns) 

      . It is likely that we can remove this doc.ns field, but further investigation into why OldClientContext is necessary for rollback is needed before removing the field. We would like the doc.ns field in the future.

      Currently, we use the doc.ns field to retrieve the database level lock, when the collection itself might not exist because it has been removed from the sync source. We need to use the doc.ns field since if we attempt to use lookupNSSByUUID, we will end up with an empty namespace string, which will cause an error to be thrown when we attempt to retrieve the database lock. This should functionally be safe because we are locking the database that the collection used to be in, and UUIDs are maintained within the database.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            allison.chang Allison Chang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: