Coverity analysis defect 155592: COPY_INSTEAD_OF_MOVE

XMLWordPrintableJSON

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

      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
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: