정의
clearJumboFlagClears the jumbo flag for a chunk. To use the command, issue the
clearJumboFlagcommand on amongosinstance.
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
명령에는 다음과 같은 구문이 있습니다.
db.adminCommand( { clearJumboFlag: "<database>.<collection>", bounds: <array> } )
-또는-
// Cannot use for collections with hashed shard keys db.adminCommand( { clearJumboFlag: "<database>.<collection>", find: <query> } )
명령 필드
The clearJumboFlag command takes the following fields as arguments:
필드 | 유형 | 설명 |
|---|---|---|
문자열 | 점보 청크가 있는 샤드 컬렉션 의 네임스페이스 입니다. 데이터베이스 이름을 포함하여 컬렉션의 전체 네임스페이스를 지정합니다(예: "<database>.<collection>") | |
배열 | 특정 청크의 정확한 경계입니다. 배열은 이동할 청크의 하위 및 상위 샤드 키 값을 지정하는 두 개의 문서로 구성되어야 합니다.
| |
문서 | 점보 청크에 포함된 특정 샤드 키와 해당 값.
|
액세스 제어
(으)로 authorization 실행되는 시스템에서 사용자는 clearJumboFlag리소스 에 대한 권한 작업을 가지고 있어야 합니다.{ db: "", collection: "" }
기본 제공 역할 clusterManager 은(는) 적절한 권한을 제공합니다.
예시
청크(범위 기반 샤드 키)에 대한 점보 플래그 지우기
sh.status() 에는 test.jumbo collection에 대한 다음 sh.status.databases.<collection>.chunk-details 가 포함되어 있습니다.
... // Content omitted for brevity test.jumbo shard key: { "x" : 1 } unique: false balancing: true chunks: shardA 2 shardB 2 { "x" : { "$minKey" : 1 } } -->> { "x" : 1 } on : shardB Timestamp(3, 0) { "x" : 1 } -->> { "x" : 2 } on : shardA Timestamp(6, 1) jumbo { "x" : 2 } -->> { "x" : 3 } on : shardA Timestamp(5, 1) jumbo { "x" : 3 } -->> { "x" : { "$maxKey" : 1 } } on : shardB Timestamp(6, 0)
The following clearJumboFlag command specifies the bounds of the { "x" : 1 } -->> { "x" : 2 } chunk:
db.adminCommand( { clearJumboFlag: "test.jumbo", bounds: [{ "x" : 1 }, { "x" : 2 }] } )
성공하면 명령은 출력에 "ok": 1 을(를) 반환합니다.
{ "ok" : 1, "operationTime" : Timestamp(1580190080, 5), "$clusterTime" : { "clusterTime" : Timestamp(1580190080, 5), "signature" : { "hash" : BinData(0,"0cYT49s72MHUYV1F2WpoEwlyeVs="), "keyId" : Long("6786859092951433239") } } }
The following clearJumboFlag command specifies the find field to find the chunk that contains the shard key { "x" : 2 } :
db.adminCommand( { clearJumboFlag: "test.jumbo", find: { "x" : 2 } } )
성공하면 명령은 출력에 "ok": 1 을(를) 반환합니다.
{ "ok" : 1, "operationTime" : Timestamp(1580191819, 5), "$clusterTime" : { "clusterTime" : Timestamp(1580191819, 5), "signature" : { "hash" : BinData(0,"N6x6drN7HUq5MR5ezUJns1rfeqY="), "keyId" : Long("6786859092951433239") } } }
작업을 확인하려면 sh.status() 를 다시 실행합니다. jumbo 플래그가 더 이상 출력에 나타나지 않아야 합니다.
... // Content omitted for brevity test.jumbo shard key: { "x" : 1 } unique: false balancing: true chunks: shardA 2 shardB 2 { "x" : { "$minKey" : 1 } } -->> { "x" : 1 } on : shardB Timestamp(3, 0) { "x" : 1 } -->> { "x" : 2 } on : shardA Timestamp(7, 0) { "x" : 2 } -->> { "x" : 3 } on : shardA Timestamp(8, 0) { "x" : 3 } -->> { "x" : { "$maxKey" : 1 } } on : shardB Timestamp(6, 0)
청크(해시 샤드 키)에 대한 점보 플래그 지우기
sh.status() 에는 test.jumboHashed collection에 대한 다음 sh.status.databases.<collection>.chunk-details 가 포함되어 있습니다. collection은 해시 샤드 키를 사용합니다.
... // Content omitted for brevity test.jumboHashed shard key: { "x" : "hashed" } unique: false balancing: true chunks: shardA 2 shardB 2 { "x" : { "$minKey" : 1 } } -->> { "x" : Long(0) } on : shardA Timestamp(1, 0) { "x" : Long(0) } -->> { "x" : Long("848411777775835583") } on : shardA Timestamp(4, 0) { "x" : Long("848411777775835583") } -->> { "x" : Long("5902408780260971510") } on : shardB Timestamp(4, 1) jumbo { "x" : Long("5902408780260971510") } -->> { "x" : { "$maxKey" : 1 } } on : shardB Timestamp(2, 2)
To clear the jumbo flag for a chunk if the collection uses a hashed shard key, use clearJumboFlag with the bounds field:
db.adminCommand( { clearJumboFlag: "test.jumboHashed", bounds: [{ "x" : Long("848411777775835583") }, { "x" : Long("5902408780260971510") }] } )
성공하면 명령은 출력에 "ok": 1 을(를) 반환합니다.
{ "ok" : 1, "operationTime" : Timestamp(1580194290, 5), "$clusterTime" : { "clusterTime" : Timestamp(1580194290, 5), "signature" : { "hash" : BinData(0,"nWCqOYVrab7NEGHWoo2NYENqHR4="), "keyId" : Long("6786875525496307742") } } }
작업을 확인하려면 sh.status() 를 다시 실행합니다. jumbo 플래그가 더 이상 출력에 나타나지 않아야 합니다.
... // Content omitted for brevity test.jumboHashed shard key: { "x" : "hashed" } unique: false balancing: true chunks: shardA 2 shardB 2 { "x" : { "$minKey" : 1 } } -->> { "x" : Long(0) } on : shardA Timestamp(1, 0) { "x" : Long(0) } -->> { "x" : Long("848411777775835583") } on : shardA Timestamp(4, 0) { "x" : Long("848411777775835583") } -->> { "x" : Long("5902408780260971510") } on : shardB Timestamp(5, 0) { "x" : Long("5902408780260971510") } -->> { "x" : { "$maxKey" : 1 } } on : shardB Timestamp(2, 2)