정의
sh.commitReshardCollection(namespace)버전 5.0의 신규 항목입니다.
리샤딩 작업 중에 MongoDB는 리샤딩 작업 완료 예상 시간이 2초 미만이 될 때까지 쓰기를 차단하지 않습니다.
현재 추정치가 2초를 초과하지만 시간 프레임이 허용 가능한 경우, 리샤딩을 더 빠르게 완료할 수 있습니다. 메서드는
sh.commitReshardCollection()쓰기를 조기에 차단하고 리샤딩 작업을 강제로 완료합니다.중요
Mongo쉬 방법
This page documents a
mongoshmethod. This is not the documentation for database commands or language-specific drivers, such as Node.js.데이터베이스 명령에 대해서는
commitReshardCollection명령을 참조하십시오.MongoDB API 드라이버의 경우 언어별 MongoDB 드라이버 설명서를 참조하세요.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
중요
이 명령은 M0 및 Flex 클러스터에서 지원되지 않습니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
The sh.commitReshardCollection() method has the following syntax:
sh.commitReshardCollection( <namespace> )
Parameter
The sh.commitReshardCollection() method takes the following parameter:
Parameter | 유형 | 설명 |
|---|---|---|
문자열 |
|
예시
리샤딩 작업 커밋
다음 명령은 쓰기를 차단하고 완료하도록 sales.orders 에 대한 리샤딩 작업 을 강제로 수행합니다.
sh.commitReshardCollection("sales.orders")