AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

sh.commitReshardCollection() (mongosh 메서드)

sh.commitReshardCollection(namespace)

버전 5.0의 신규 항목입니다.

sh.commitReshardCollection() 쓰기를 조기에 차단하고 리샤딩 작업을 강제로 완료합니다.

리샤딩 작업 중에 MongoDB 리샤딩 작업을 완료하는 데 걸리는 예상 시간이 특정 값 아래로 떨어질 때까지 쓰기를 차단 하지 않습니다. MongoDB 8.0.12 이전 버전에서는 이 값이 2초입니다. MongoDB 8.0.13 이상에서 이 값은 500 밀리초입니다.

현재 예상 지속 시간이 임계값을 초과하지만 시간 프레임이 허용 가능한 경우, sh.commitReshardCollection()를 호출하여 리샤딩을 더 빠르게 완료할 수 있습니다. 이렇게 하면 쓰기가 조기에 차단되고 리샤딩 작업이 강제로 완료됩니다.

중요

Mongo쉬 방법

This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.

데이터베이스 명령에 대해서는 commitReshardCollection 명령을 참조하십시오.

MongoDB API 드라이버의 경우 언어별 MongoDB 드라이버 설명서를 참조하세요.

이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

중요

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

The sh.commitReshardCollection() method has the following syntax:

sh.commitReshardCollection( <namespace> )

The sh.commitReshardCollection() method takes the following parameter:

Parameter
유형
설명

문자열

"<database>.<collection>" 형식으로 샤딩할 컬렉션의 이름입니다.

다음 명령은 쓰기를 차단하고 완료하도록 sales.orders 에 대한 리샤딩 작업 을 강제로 수행합니다.

sh.commitReshardCollection("sales.orders")
이 페이지 평가하기

이 페이지의 내용