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

Optimize StorageInterfaceImpl::findOplogEntryLessThanOrEqualToTimestamp Signature for Improved Performance

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • Repl 2024-03-18

      Upon review, it seems that StorageInterfaceImpl::findOplogEntryLessThanOrEqualToTimestamp is primarily utilized to retrieve the optime from the oplog. In all instances where the function is used, the obtained object undergoes parsing with repl::OpTime::parseFromOplogEntry. However, the current process involves using getOwned() to acquire the oplog object to out live the local cursor, potentially resulting in a deep copy of the entire object, which may impact performance. Given that only the optime is required, I suggest revising the function's signature to handle parsing internally and return solely the optime. This adjustment aims to streamline the process and enhance performance.

            Assignee:
            m.maher@mongodb.com Moustafa Maher
            Reporter:
            m.maher@mongodb.com Moustafa Maher
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: