정의
버전 7.0에 추가 되었습니다.
sh.enableAutoMerger() is a mongosh helper method. It is effectively the same as running the configureCollectionBalancing command with the enableAutoMerger field set to true.
중요
Mongo쉬 방법
This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.
데이터베이스 명령에 대해서는 configureCollectionBalancing 명령을 참조하십시오.
MongoDB API 드라이버의 경우 언어별 MongoDB 드라이버 설명서를 참조하세요.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
중요
이 명령은 M0 및 Flex 클러스터에서 지원되지 않습니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
sh.enableAutoMerger( <namespace> )
메서드 필드
이 메서드는 다음 필드를 사용합니다.
필드 | 유형 | 필요성 | 설명 |
|---|---|---|---|
| 문자열 | 필수 사항 |
|
행동
자동 청크 병합의 시간 간격을 설정하려면 다음 매개 변수를 사용합니다.
참고
이러한 매개변수는 config 서버 에서만 설정하다 수 있습니다.
예시
다음 예에서는 "testDatabase.myCollection" 에 대한 자동 청크 병합을 활성화합니다. mongos 에서 예시를 실행합니다.
sh.enableAutoMerger( "testDatabase.myCollection" )
자세히 알아보기
autoMergerIntervalSecsparameterautoMergerThrottlingMSparameter