문서 메뉴

문서 홈애플리케이션 개발MongoDB 매뉴얼

setAllowMigrations

이 페이지의 내용

  • 정의
  • 행동
  • 예제
setAllowMigrations

버전 5 에 추가되었습니다.0.6.

컬렉션에서 새로운 자동 마이그레이션 이 시작되는 것을 방지하고, 진행 중인 수동 마이그레이션 이 커밋되지 않도록 방지하며, 새 밸런서 라운드에서 컬렉션을 제외합니다.

명령은 다음과 같은 구문을 가집니다:

db.adminCommand( {
setAllowMigrations: "<db>.<collection>",
allowMigrations: <true|false>
} )

이 명령은 다음 매개 변수를 사용합니다.

필드
유형
설명
setAllowMigrations
string

수정할 컬렉션입니다.

boolean

false인 경우:

  • MongoDB는 다음 collection에서 새로운 자동 마이그레이션 을 방지합니다.

  • 진행 중인 수동 마이그레이션 은 커밋되지 않습니다.

  • collection은 뉴 밸런서 라운드에서 제외됩니다.

true인 경우:

setAllowMigrations 에는 moveChunk 과 동일한 권한이 필요합니다.

이 작업은 store.inventory collection에서의 마이그레이션을 방지합니다.

db.adminCommand( {
setAllowMigrations: "store.inventory",
allowMigrations: false
} )
← reshardCollection

이 페이지의 내용