정의
flushRouterConfigflushRouterConfig샤딩된 클러스터 의 캐시된 라우팅 테이블을 오래된 것으로 표시하여 라우팅 테이블에 캐시 새로 고침을 요청하는 다음 작업을 유발합니다. 라우팅 테이블 캐시 관리는 클러스터 에서 자동으로 처리됩니다.
참고
Running flushRouterConfig is no longer required after executing movePrimary, dropDatabase, or db.collection.getShardDistribution(). These commands now automatically refresh a sharded cluster's routing table as needed when run.
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: 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 } )