Refactor Code and Update Comment for applyOps Insert

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The current code comment does not accurately describe the behavior when handling applyOps commands during inserts. The comment makes the following assumptions that seem to be incorrect based on manual testing:

      1. Incorrect Assumption:
        • The comment assumes that there will always be a wrapping WriteUnitOfWork that helps identify when we are in an applyOps command.
        • However, during a applyOps command we don't have a wrapping WriteUnitOfWork for what I could tell via manual testing.
      1. Unexpected Behavior:
        • When executing an applyOps command, it is observed that instead of bypassing the insert section and directly performing the upsert as described in the code comment, the code executes both an insert and an upsert. This results in an upsert being performed on top of record just inserted that, even when produces the correct result, is unnecesary.

            Assignee:
            Unassigned
            Reporter:
            Ernesto Rodriguez Reina
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: