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

flushRouterConfig (데이터베이스 명령)

flushRouterConfig

flushRouterConfig marks the cached routing table for a sharded cluster as stale, causing the next operation that requests the routing table to refresh the cache. Management of the routing table cache is generally handled automatically by the cluster. You should only need to run the flushRouterConfig command manually in specific instances, as indicated under Considerations.

참고

Running flushRouterConfig is no longer required after executing the movePrimary or dropDatabase commands. These two commands now automatically refresh a sharded cluster's routing table as needed when run.

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

  • MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스

The flushRouterConfig is available on both mongos and mongod instances, and has the following syntax:

  • 컬렉션 네임스페이스 매개 변수를 전달하면 지정된 컬렉션에 대한 캐시를 플러시합니다.

    db.adminCommand(
    {
    flushRouterConfig: "<db.collection>"
    }
    )
  • 데이터베이스 네임스페이스 매개변수로 전달될 때 지정된 데이터베이스 및 모든 해당 컬렉션에 대한 캐시를 플러시합니다.

    db.adminCommand(
    {
    flushRouterConfig: "<db>"
    }
    )
  • 매개 변수 없이 실행되거나 문자열이 아닌 스칼라 값(예: 1):

    db.adminCommand("flushRouterConfig")
    db.adminCommand(
    {
    flushRouterConfig: 1
    }
    )

Generally, a sharded cluster's routing table is automatically refreshed as needed as part of normal operation. However, you should manually issue the flushRouterConfig command before running the db.collection.getShardDistribution() command. This ensures that the command returns the most up-to-date information.

이 페이지 평가하기

이 페이지의 내용