Does DBCursor.getServerAddress work as I expect? <p>I expect <a href="http://api.mongodb.org/java/2.6/com/mongodb/DBCursor.html#getServerAddress%28%29" rel="nofollow">getServerAddress</a> to return the address of the Mongo server (one of replica set nodes), which actually handles the query.</p> <p>I am logging output of <a href="http://api.mongodb.org/java/2.6/com/mongodb/DBCursor.html#getServerAddress%28%29" rel="nofollow">getServerAddress</a> and see only the <em>primary</em> address although I am <em>pretty sure</em> that some queries are handled by <em>secondary</em>.</p> <p>I am a little bit confused since I see queries (having set <code>profillingLevel</code>) in the <em>secondary</em> while <a href="http://api.mongodb.org/java/2.6/com/mongodb/DBCursor.html#getServerAddress%28%29" rel="nofollow">getServerAddress</a> returns the <em>primary</em>. Maybe I am mistaken though ...</p> <p>Can it be a bug in the API ? Does anybody encounter such a problem ? Is it possible that <a href="http://api.mongodb.org/java/2.6/com/mongodb/DBCursor.html#getServerAddress%28%29" rel="nofollow">getServerAddress</a> always returns the <em>primary</em> while some queries are actually handled by <em>secondaries</em> ?</p>