<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10:38 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-6056] memory leak.   query time out when sharding. </title>
                <link>https://jira.mongodb.org/browse/SERVER-6056</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;mognos:&lt;br/&gt;
ConnectionShardStatus preserve map&amp;lt;DBClientBase*, map&amp;lt;string,unsigned long long&amp;gt; &amp;gt; _map;  to keep sequence number.    when checkShardVersion , call setSequence to set de map, use key :&lt;br/&gt;
conn = getVersionable(&amp;amp;conn_in); (which is connection to master of replicaset when use shard and replicaset).  but when shardconnection onDestroy, resetShardVersion use key&#12288;is ptr to shardconnection , not the connection to master of replicaset.  So each time _map.erase(conn) return 0, and _map size always increase. &lt;/p&gt;

&lt;p&gt;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 &amp;gt;2 times, and cause web client wait 3 -5 seconds. &lt;/p&gt;

&lt;p&gt;i modify shard_version.cpp resetShardVersion function ,  when conn type is SET, connectionShardStatus.reset( getVersionable(conn) );  , fix this problem.&lt;/p&gt;</description>
                <environment>linux ,  3 shard,   each 3 server replicaset. </environment>
        <key id="40926">SERVER-6056</key>
            <summary>memory leak.   query time out when sharding. </summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="backlog-server-sharding">[DO NOT USE] Backlog - Sharding Team</assignee>
                                    <reporter username="peanutgyz">peanutgyz</reporter>
                        <labels>
                            <label>connection</label>
                            <label>mongos</label>
                            <label>sharding</label>
                    </labels>
                <created>Mon, 11 Jun 2012 03:19:37 +0000</created>
                <updated>Tue, 6 Dec 2022 05:32:34 +0000</updated>
                            <resolved>Wed, 21 Mar 2018 19:06:46 +0000</resolved>
                                    <version>2.0.5</version>
                    <version>2.0.6</version>
                    <version>2.2.3</version>
                                                    <component>Sharding</component>
                                        <votes>1</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1841168" author="greg.mckeon" created="Wed, 21 Mar 2018 19:06:46 +0000"  >&lt;p&gt;Sharded queries no longer use this codepath.  Please reopen if this is still an issue.&lt;/p&gt;</comment>
                            <comment id="402258" author="greg_10gen" created="Tue, 13 Aug 2013 20:22:26 +0000"  >&lt;p&gt;There&apos;s been progress, but we&apos;re currently working on refactoring that entire codepath, which should make this better long-term.&lt;/p&gt;

&lt;p&gt;The workaround for now is to use connection pooling in the driver to avoid creating lots of new connections to mongos.&lt;/p&gt;</comment>
                            <comment id="399183" author="jeweljar" created="Fri, 9 Aug 2013 02:51:53 +0000"  >&lt;p&gt;any progress on this issue?&lt;br/&gt;
I have the exact same situation here too, even with the latest v2.4.5.&lt;br/&gt;
Short-living connections to mongos caused the &apos;connectionShartStatus._map&apos; always increase, which make mongos get OOM killed finally.&lt;/p&gt;

&lt;p&gt;After applying the peanutgyz&apos;s patch to version_manager.cpp of v2.4.5, the memory leak has gone away.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; VersionManager::resetShardVersionCB( DBClientBase * conn ) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;( isVersionableCB( conn ) ) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// In addition to peanutgyz&apos;s patch,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// there is possibility that getVersionable() throws an exception.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// So, we have to catch it.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;            DBClientBase* c = getVersionable( conn );&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;( c ) conn = c;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        } &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; (std::exception&amp;amp; e) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// something meaningful here, if any?&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    connectionShardStatus.reset( conn );&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="273407" author="spencer" created="Fri, 22 Feb 2013 20:35:56 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=peanutgyz&quot; class=&quot;user-hover&quot; rel=&quot;peanutgyz&quot;&gt;peanutgyz&lt;/a&gt;.  I have taken a closer look at the code and agree with you now that there is a potential memory leak here.  I am currently discussing the best way to fix it with my colleagues.  Thank you for your help bringing this to our attention!&lt;/p&gt;</comment>
                            <comment id="247436" author="peanutgyz" created="Wed, 23 Jan 2013 10:31:20 +0000"  >&lt;p&gt;can someone give me response ?&lt;/p&gt;</comment>
                            <comment id="241073" author="peanutgyz" created="Wed, 16 Jan 2013 03:28:23 +0000"  >&lt;p&gt;1. I found there is 2 connection pool, one is defined at client/connpool.h DBConnectionPool pool; another is defined at  s/shardconnection.cpp DBConnectionPool shardConnectionPool;   &lt;br/&gt;
   when run connPoolStats command,  will run db/commands.cpp PoolStats() : Command( &quot;connPoolStats&quot; ) {}  command,   which just call  pool.appendInfo( result );,&lt;br/&gt;
   so the output doesn&apos;t show anything about shardConnectionPool ? is it right ?&lt;/p&gt;

&lt;p&gt;2. i change the code to     PoolStats() : Command( &quot;connPoolStats&quot; ) {}  command,   which just call  shardConnectionPool.appendInfo( result );, to check shardConnectionPool info, &lt;br/&gt;
   when i create 400 concurrent connection , in connPoolStats output i got &lt;/p&gt;

&lt;p&gt;            	&quot;hosts&quot; : {&lt;br/&gt;
		&quot;shard0001/s1:10001,s2:10002,s3:10003::0&quot; : &lt;/p&gt;
{
			&quot;available&quot; : 0,
			&quot;created&quot; : 401
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;shard0002/s1:10011,s2:10012,s3:10013::0&quot; : &lt;/p&gt;
{
			&quot;available&quot; : 0,
			&quot;created&quot; : 401
		}
&lt;p&gt;	},&lt;/p&gt;

&lt;p&gt;map size is 802 now . &lt;/p&gt;

&lt;p&gt;after i close all client connection , output change to :&lt;/p&gt;

&lt;p&gt;            	&quot;hosts&quot; : {&lt;br/&gt;
		&quot;shard0001/s1:10001,s2:10002,s3:10003::0&quot; : &lt;/p&gt;
{
			&quot;available&quot; : 50,
			&quot;created&quot; : 401
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;shard0002/s1:10011,s2:10012,s3:10013::0&quot; : &lt;/p&gt;
{
			&quot;available&quot; : 50,
			&quot;created&quot; : 401
		}
&lt;p&gt;	},&lt;/p&gt;

&lt;p&gt;but map size is still 802.   map size never scale down , &lt;/p&gt;


&lt;p&gt;3.   i think,   mongos keep connection pool to all shard, but each pool has  _maxPerHost = 50 limit . when a lot of client connection to mongos at same time , each client connection pop connection &lt;br/&gt;
   from pool, and pool will be empty. &lt;br/&gt;
     when client close connection , will push connection to mongod back to connection pool, and max pool size is 50, so when pool is fool , mongos will destroy shardConnection. &lt;/p&gt;

&lt;p&gt;     in shardConnection destruct func,   will call versionManager.resetShardVersionCB( _conn ).   &lt;br/&gt;
        connectionShardStatus   ::  &lt;br/&gt;
        void reset( DBClientBase * conn ) &lt;/p&gt;
{
            scoped_lock lk( _mutex );
            _map.erase( conn );
        }
&lt;p&gt;       _map.erase(conn)  always return 0, never delete item from map.&lt;/p&gt;

&lt;p&gt;     because when shardConnection destruct, it use ptr to shardConnection to reset map, &lt;br/&gt;
         but when setSequence,   it use conn = getVersionable(conn_in)  the connection to master , to insert data into map, so map always incr.&lt;/p&gt;



</comment>
                            <comment id="240757" author="spencer" created="Tue, 15 Jan 2013 20:47:44 +0000"  >&lt;p&gt;Mongos keeps a connection pool to all the shards.  This pool does not scale down as the number of incoming client connections goes down - all connections opened remain opened forever unless there is a problem on that socket.  That makes me think this isn&apos;t a bug.  You can see information about the connections in the connection pool by running the &quot;connPoolStats&quot; command.  So long as the size of _map remains relative to the number of connections in the connection pool, I don&apos;t think there is a memory leak.  Can you check the size of the connection pool using connPoolStats and see if the size of _map scales with the size of the connection pool?&lt;/p&gt;</comment>
                            <comment id="240207" author="peanutgyz" created="Tue, 15 Jan 2013 09:34:02 +0000"  >&lt;p&gt;3 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2013&amp;#93;&lt;/span&gt; _map size is 3769 conn is 0x7f819c24be60, sequence is 0&lt;br/&gt;
4 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2011&amp;#93;&lt;/span&gt; _map size is 3770 conn is 0x7f819c1d1200, sequence is 0&lt;br/&gt;
5 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2013&amp;#93;&lt;/span&gt; _map size is 3770 conn is 0x7f819c1d18c0, sequence is 0&lt;br/&gt;
6 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2015&amp;#93;&lt;/span&gt; _map size is 3770 conn is 0x7f819c2ba5a0, sequence is 0&lt;br/&gt;
7 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2015&amp;#93;&lt;/span&gt; _map size is 3771 conn is 0x7f819c24c240, sequence is 0&lt;br/&gt;
8 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2012&amp;#93;&lt;/span&gt; _map size is 3771 conn is 0x7f8199bd8240, sequence is 0&lt;br/&gt;
9 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2012&amp;#93;&lt;/span&gt; _map size is 3772 conn is 0x7f819c1d1560, sequence is 0&lt;br/&gt;
0 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2014&amp;#93;&lt;/span&gt; _map size is 3772 conn is 0x7f8199bdc120, sequence is 0&lt;br/&gt;
1 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2014&amp;#93;&lt;/span&gt; _map size is 3773 conn is 0x7f819c1d1e60, sequence is 0&lt;br/&gt;
2 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2016&amp;#93;&lt;/span&gt; _map size is 3773 conn is 0x7f8199bdc5a0, sequence is 0&lt;br/&gt;
3 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2016&amp;#93;&lt;/span&gt; _map size is 3774 conn is 0x7f819c2485a0, sequence is 0&lt;br/&gt;
4 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2018&amp;#93;&lt;/span&gt; _map size is 3774 conn is 0x7f8199bdc900, sequence is 0&lt;br/&gt;
5 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2018&amp;#93;&lt;/span&gt; _map size is 3775 conn is 0x7f819c249320, sequence is 0&lt;br/&gt;
6 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2017&amp;#93;&lt;/span&gt; _map size is 3775 conn is 0x7f8199bdcfc0, sequence is 0&lt;br/&gt;
7 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2017&amp;#93;&lt;/span&gt; _map size is 3776 conn is 0x7f819c248900, sequence is 0&lt;br/&gt;
8 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2020&amp;#93;&lt;/span&gt; _map size is 3776 conn is 0x7f8199bdd320, sequence is 0&lt;br/&gt;
9 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2020&amp;#93;&lt;/span&gt; _map size is 3777 conn is 0x7f819c249d40, sequence is 0&lt;br/&gt;
0 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2019&amp;#93;&lt;/span&gt; _map size is 3777 conn is 0x7f8199bdcc60, sequence is 0&lt;br/&gt;
1 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2019&amp;#93;&lt;/span&gt; _map size is 3778 conn is 0x7f819c2499e0, sequence is 0&lt;br/&gt;
2 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1997&amp;#93;&lt;/span&gt; _map size is 3778 conn is 0x7f8199bdd680, sequence is 0&lt;br/&gt;
3 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1997&amp;#93;&lt;/span&gt; _map size is 3779 conn is 0x7f819d96cfc0, sequence is 0&lt;br/&gt;
4 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2021&amp;#93;&lt;/span&gt; _map size is 3779 conn is 0x7f8199bdd9e0, sequence is 0&lt;br/&gt;
5 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2021&amp;#93;&lt;/span&gt; _map size is 3780 conn is 0x7f819c24c480, sequence is 0&lt;br/&gt;
6 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2008&amp;#93;&lt;/span&gt; _map size is 3780 conn is 0x7f8199bddd40, sequence is 0&lt;br/&gt;
7 Tue Jan 15 17:24:18 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2008&amp;#93;&lt;/span&gt; _map size is 3781 conn is 0x7f819c1e3680, sequence is 0&lt;/p&gt;</comment>
                            <comment id="240204" author="peanutgyz" created="Tue, 15 Jan 2013 09:31:22 +0000"  >&lt;p&gt;S getSequence( DBClientBase * conn , const string&amp;amp; ns ) {&lt;br/&gt;
    scoped_lock lk( _mutex );&lt;br/&gt;
    log() &amp;lt;&amp;lt; &quot;_map size is &quot; &amp;lt;&amp;lt; _map.size() &amp;lt;&amp;lt; endl;&lt;br/&gt;
    return _map&lt;span class=&quot;error&quot;&gt;&amp;#91;conn&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ns&amp;#93;&lt;/span&gt;;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;I change the shard_version.cpp ,  add log to watch _map size.&lt;/p&gt;

&lt;p&gt;Then, i create 500 concurrent connection to mongos , query data,  and _map  incr. &lt;br/&gt;
But when i close all client connection , _map size never decr. &lt;/p&gt;</comment>
                            <comment id="163015" author="spencer" created="Tue, 11 Sep 2012 15:55:21 +0000"  >&lt;p&gt;I&apos;m resolving this ticket due to lack of activity.&lt;/p&gt;

&lt;p&gt;If you have a test that demonstrates this problem, feel free to re-open.&lt;/p&gt;</comment>
                            <comment id="134888" author="spencer" created="Wed, 20 Jun 2012 17:46:45 +0000"  >&lt;p&gt;Do you have a test that reproduces the problem?&lt;br/&gt;
Can you attach the patch you made that fixes it?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25141"><![CDATA[Sharding]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 20 Jun 2012 17:46:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 47 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 47 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-sharding</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>jeweljar</customfieldvalue>
            <customfieldvalue>peanutgyz</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro0fz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrftun:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6905</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlgm7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>