정의
commitReshardCollection버전 5.0의 신규 항목입니다.
리샤딩 작업 중에 MongoDB는 리샤딩 작업 완료 예상 시간이 2초 미만이 될 때까지 쓰기를 차단하지 않습니다.
현재 추정치가 2초를 초과하지만 시간 프레임이 허용 가능한 경우, 리샤딩을 더 빠르게
commitReshardCollection완료할 수 있습니다. 명령은 쓰기를 조기에 차단하고 리샤딩 작업을 강제로 완료합니다.팁
In
mongosh, this command can also be run through thesh.commitReshardCollection()helper method.Helper methods are convenient for
mongoshusers, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
참고
이 명령은 모든 MongoDB Atlas 클러스터에서 지원됩니다. 모든 명령에 대한 Atlas 지원에 관해 자세히 알아보려면 지원되지 않는 명령을 참조하세요.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
명령은 다음과 같은 구문을 가집니다:
db.adminCommand( { commitReshardCollection: "<database>.<collection>" } )
는 래퍼 mongosh 메서드를 sh.commitReshardCollection() 제공합니다.
예시
리샤딩 작업 커밋
다음 명령은 쓰기를 차단하고 완료하도록 sales.orders 에 대한 리샤딩 작업 을 강제로 수행합니다.
db.adminCommand({ commitReshardCollection: "sales.orders" })