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

memory leak. query time out when sharding.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 2.0.5, 2.0.6, 2.2.3
    • Fix Version/s: None
    • Component/s: Sharding
    • Environment:
      linux , 3 shard, each 3 server replicaset.
    • Operating System:
      ALL

      Description

      mognos:
      ConnectionShardStatus preserve map<DBClientBase*, map<string,unsigned long long> > _map; to keep sequence number. when checkShardVersion , call setSequence to set de map, use key :
      conn = getVersionable(&conn_in); (which is connection to master of replicaset when use shard and replicaset). but when shardconnection onDestroy, resetShardVersion use key is ptr to shardconnection , not the connection to master of replicaset. So each time _map.erase(conn) return 0, and _map size always increase.

      because i use short connection in web client , each time client close connection , mongos destroy shardconnection and cause _map increate. sometimes mongos create new connection to mongod, with same pointer position with an old connection object, cause the new connection can get an positive sequence from _map , of 0!. it will cause checkShardVersion run >2 times, and cause web client wait 3 -5 seconds.

      i modify shard_version.cpp resetShardVersion function , when conn type is SET, connectionShardStatus.reset( getVersionable(conn) ); , fix this problem.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-sharding Backlog - Sharding Team
            Reporter:
            peanutgyz peanutgyz
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: