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

oplog 사이징

The mongosync program uses change streams to synchronize data between source and destination clusters. mongosync does not access the oplog directly, but when a change stream returns events from the past, the events must be within the oplog time range.

mongosync 컬렉션 복사 단계 후에 소스 클러스터 의 oplog 작업을 대상 클러스터 의 데이터에 적용합니다. mongosync 적용되지 않은 작업이 소스 클러스터 에서 oplog 롤오프되면 동기화 가 실패하고 mongosync 가 종료됩니다.

참고

mongosync does not replicate applyOps operations made on the source cluster during sync to the destination cluster.

If you anticipate syncing a large data set, or if you plan to pause synchronization for an extended period of time, you might exceed the oplog window. Use the oplogSizeMB setting to increase the size of the oplog on the source cluster.

대상 클러스터 마이그레이션되는 논리적 데이터 크기와 초기 동기화 의 대상 oplog 항목을 수용할 수 있는 충분한 디스크 저장 있어야 합니다. 예시 를 들어 10 GB 의 데이터를 마이그레이션 하려면 대상 클러스터 최소 10 GB 의 데이터 사용 가능 공간이 있어야 하며, 초기 동기화 의 삽입 oplog 항목을 위한 추가 10 GB 있어야 합니다.

내장된 검증을 사용하려면 대상에 더 큰 oplog 있어야 합니다. 내장된 검증자를 활성화 하고 대상 oplog 의 크기를 줄이면 내장된 검증자가 이를 따라잡지 못해 mongosync 오류가 발생할 수 있습니다.

대상 oplog 항목의 오버헤드 줄여야 하고 내장된 검증자가 비활성화된 경우 다음을 수행할 수 있습니다.

  • Use the oplogSizeMB setting to lower the destination cluster's oplog size.

  • Use to oplogMinRetentionHours setting to lower or remove the destination cluster's minimum oplog retention period.

1

To get the difference in seconds between the first and last entry in the oplog run db.getReplicationInfo(). If you are replicating a sharded cluster, run the command on each shard.

db.getReplicationInfo().timeDiff

반환되는 값은 cluster의 최소 oplog 창입니다. 여러 개의 샤드가 있는 경우 가장 작은 숫자가 최소 oplog 윈도우입니다.

2

lag.overallLagSeconds 값을 가져오려면 /progress 명령을 실행합니다. 지연 시간은 mongosync 에서 적용한 마지막 이벤트와 소스 클러스터의 현재 최신 이벤트 시간 사이의 시간(초)입니다.

소스 클러스터 mongosync 가 얼마나 뒤쳐져 있는지를 측정한 값입니다.

3

지연 시간이 최소 oplog 창에 근접하면 다음 중 하나를 변경합니다.

  • Increase the oplog window. Use replSetResizeOplog to set minRetentionHours greater than the current oplog window.

    참고

    replSetResizeOplog is unsupported in Atlas. To resize the oplog in Atlas, see Set Minimum Oplog Window.

  • mongosync 인스턴스를 확장합니다. CPU 또는 메모리를 추가하여 복사 속도가 빨라지도록 mongosync 노드를 확장합니다.

참고

The oplog window and rate of change for replication lag may vary during synchronization. Repeat these steps during a migration to monitor the progress.