On this page本页内容
clearJumboFlag¶Available starting in 4.2.3 and 4.0.15
Clears the jumbo flag for a chunk. To use the command, issue the clearJumboFlag command on a mongos instance.
clearJumboFlag has the following syntaxes:
-OR-
The clearJumboFlag command takes the following fields as arguments:
| clearJumboFlag | string | The namespace of the sharded collection with the jumbo chunk(s). Specify the collection’s full namespace, including the database name (i.e. “<database>.<collection>”) |
| bounds | array | The exact bounds of a specific chunk. The array must consist of two documents that specify the lower and upper shard key values of a chunk to move:
Note
|
| find | document | A specific shard key and its value contained in the jumbo chunk.
Note
|
On systems running with authorization, the user must have the clearJumboFlag privilege actions on the {
db: "", collection: "" } resource.
The built-in role clusterManager provides the appropriate privileges.
The sh.status() includes the following sh.status.databases.<collection>.chunk-details for the test.jumbo collection.
The following clearJumboFlag command specifies the bounds of the { "x" : 1 } -->> { "x" :
2 } chunk:
Upon success, the command returns "ok": 1 in its output:
The following clearJumboFlag command specifies the find field to find the chunk that contains the shard key { "x" : 2 } :
Upon success, the command returns "ok": 1 in its output:
To verify the operation, run sh.status() again. The jumbo flag should no longer appear in its output.
The sh.status() includes the following sh.status.databases.<collection>.chunk-details for the test.jumboHashed collection. The collection uses a hashed shard key.
To clear the jumbo flag for a chunk if the collection uses a hashed shard key, use clearJumboFlag with the bounds field:
Upon success, the command returns "ok": 1 in its output:
To verify the operation, run sh.status() again. The jumbo flag should no longer appear in its output.
See also参阅