title: MongoDB rename or drop a collection on a SyncClusterConnection
body: <p>I have a collection I want to drop / rename. I have written the following javascript to do this:</p>
  
  <pre><code>var now = new Date();
  var runTime = now.getTime();
  var newCollName = "myColl." + runTime;
  db.myColl.renameCollection(newCollName);
  </code></pre>
  
  <p>When I run the script on my single node dev install the drop or rename works fine.  However when I try the same command on the real instance which is clustered and uses replicasets I get the following error:</p>
  
  <pre><code>Renaming myColl collection to : myColl.1449761151171
  2015-12-10T15:25:55.703+0000 E QUERY    Error: write $cmd not supported in SyncClusterConnection::query for:renameCollection
  at DBQuery._exec (src/mongo/shell/query.js:83:36)
  at DBQuery.hasNext (src/mongo/shell/query.js:240:10)
  at DBCollection.findOne (src/mongo/shell/collection.js:187:19)
  at DB.runCommand (src/mongo/shell/db.js:58:41)
  at DB.adminCommand (src/mongo/shell/db.js:66:41)
  at DBCollection.renameCollection (src/mongo/shell/collection.js:642:21)
  </code></pre>
  
  <p>I've read the mongodb notes for drop and renameCollection, but they dont mention needing to do anything special when running the commands on clustered database.</p>
  
  <p>What do I need to do to archive off a collection on a MongoDB that is structured like this?</p>
  
  <p>thanks.</p>