avoid copying invalid iterator in StreamableReplicaSetMonitor

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: