From 84af205a61de55019a80864d06e45160498c0828 Mon Sep 17 00:00:00 2001 From: Asya Kamsky Date: Fri, 13 Dec 2013 11:52:24 -0800 Subject: [PATCH 1/3] secondaryThrottle only changes wait for all documents we always do it during critical section --- source/tutorial/configure-sharded-cluster-balancer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorial/configure-sharded-cluster-balancer.txt b/source/tutorial/configure-sharded-cluster-balancer.txt index d583d7a12cb..35b9567f2b7 100644 --- a/source/tutorial/configure-sharded-cluster-balancer.txt +++ b/source/tutorial/configure-sharded-cluster-balancer.txt @@ -117,7 +117,7 @@ Require Replication before Chunk Migration (Secondary Throttle) ``_secondaryThrottle`` became an option to the balancer and to :dbcommand:`moveChunk` in 2.2.1. ``_secondaryThrottle`` makes it possible to require the balancer wait for replication to - secondaries during migrations. + secondaries for all documents during migrations. .. versionchanged:: 2.4 ``_secondaryThrottle`` became the default mode for all balancer and From 3026b84e6d5588d312552016f4aa566ded8eebdd Mon Sep 17 00:00:00 2001 From: Asya Kamsky Date: Fri, 13 Dec 2013 12:06:00 -0800 Subject: [PATCH 2/3] typos --- source/tutorial/configure-sharded-cluster-balancer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorial/configure-sharded-cluster-balancer.txt b/source/tutorial/configure-sharded-cluster-balancer.txt index 35b9567f2b7..480092c0360 100644 --- a/source/tutorial/configure-sharded-cluster-balancer.txt +++ b/source/tutorial/configure-sharded-cluster-balancer.txt @@ -30,7 +30,7 @@ migrate chunks, as described in the following procedures: - :ref:`sharding-balancing-remove-window`. -The :program:`mongos` instances user their own local timezones to when +The :program:`mongos` instances use their own local timezones when respecting balancer window. .. _sharded-cluster-config-default-chunk-size: From 462b7ce974937b99addd89b4d3158228203ba235 Mon Sep 17 00:00:00 2001 From: Asya Kamsky Date: Mon, 28 Jul 2014 20:53:21 -0400 Subject: [PATCH 3/3] Fix examples of filtering To show that currentOp takes a query predicate (no need to iterate) --- source/includes/example-filter-current-op.rst | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/source/includes/example-filter-current-op.rst b/source/includes/example-filter-current-op.rst index a4924c081a4..bcaecce3343 100644 --- a/source/includes/example-filter-current-op.rst +++ b/source/includes/example-filter-current-op.rst @@ -1,29 +1,28 @@ -- Return all pending write operations: +- Return all write operations waiting for lock: .. code-block:: javascript - db.currentOp().inprog.forEach( - function(d){ - if(d.waitingForLock && d.lockType != "read") - printjson(d) + db.currentOp({ + "waitingForLock" : true, + "op" : { "$in" : [ "insert", "update", "remove" ] } }) -- Return the active write operation: +- Return all active running operation that have never yielded: .. code-block:: javascript - db.currentOp().inprog.forEach( - function(d){ - if(d.active && d.lockType == "write") - printjson(d) + db.currentOp({ + "active" : true, + "numYields" : 0, + "waitingForLock" : false }) -- Return all active read operations: +- Return all active queries for database "db1" that have been running longer than 3 seconds: .. code-block:: javascript - db.currentOp().inprog.forEach( - function(d){ - if(d.active && d.lockType == "read") - printjson(d) + db.currentOp({ + "active" : true, + "secs_running" : { "$gt" : 3 }, + "ns" : /^db1./ })