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

avoid copying invalid iterator in StreamableReplicaSetMonitor

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding NYC
    • ALL
    • 37

      Fixes BF-28895.

      The GLIBCXX_DEBUG macros complain about making a copy of an invalidated iterator, whether you use it or not.

      We copy a potentially invalid iterator here, but we don't use it unless other conditions indicate that the bound copy is still valid.
      https://github.com/10gen/mongo/blob/0e6a660c41d4a07228837835f572daedd3683fc0/src/mongo/client/streamable_replica_set_monitor.cpp#L422

      We don't use it, but the instrumentation doesn't know that. It just complains about the copy, so we can conditionally copy to fix this problem.

            Assignee:
            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: