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

Coverity analysis defect 155592: COPY_INSTEAD_OF_MOVE

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Execution Team 2024-05-27, Execution Team 2024-06-10

      COPY_INSTEAD_OF_MOVE

      Unnecessary object copies can affect performance. Creating a copy of a variable that is no longer used instead of using std::move().
      /src/mongo/db/timeseries/bucket_catalog/bucket_catalog_internal.cpp:1314: COPY_INSTEAD_OF_MOVE 155592 "stripeLock" is passed-by-value as parameter to "allocateBucket" when it could be moved instead.
      /src/mongo/util/concurrency/with_lock.h:84: COPY_INSTEAD_OF_MOVE 155592 Type "mongo::WithLock" is move-constructible.

            Assignee:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: