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

db.fsyncUnlock() (mongosh 메서드)

db.fsyncUnlock()

서버의 잠금 횟수를 줄여 쓰기 작업을 다시 활성화합니다.

MongoDB 7.0.2 (6.0.11및 5.0.22부터도 사용 가능)부터 db.fsyncLock()db.fsyncUnlock() 메서드는 mongos에서 실행되어 샤딩된 클러스터를 잠그거나 잠금 해제할 수 있습니다.

중요

Mongo쉬 방법

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

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

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

Servers maintain an fsync lock count. The fsyncLock() method increments the lock count while the fsyncUnlock() method decrements it. To unlock writes on a server or cluster, call the fsyncUnlock() method until the lock count reaches zero.

db.fsyncUnlock() is an administrative operation. Use this method to unlock a server or cluster after a backup operation

db.fsyncUnlock() 의 구문은 다음과 같습니다.

db.fsyncUnlock()

이 작업은 다음 필드가 있는 문서를 반환합니다.

info

작업 상태에 대한 정보입니다.

lockCount

작업 후 인스턴스에 남아 있는 잠금 수입니다.

ok

상태 코드입니다.

The db.fsyncUnlock() method wraps the fsyncUnlock command.

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

중요

이 명령은 MongoDB Atlas 클러스터에서 지원되지 않습니다. 모든 명령에 대한 Atlas 지원에 관해 자세히 알아보려면 지원되지 않는 명령을 참조하세요.

db.fsyncLock()은(는) cp, scp 또는 tar와(과) 같은 낮은 수준의 백업 유틸리티를 사용하여 데이터 파일을 안전하게 복사할 수 있도록 보장합니다. 복사된 파일을 사용하여 시작된 mongod에는 잠긴 mongod의 사용자 작성 데이터와 구별할 수 없는 사용자 작성 데이터가 포함되어 있습니다.

잠긴 mongod 의 데이터 파일은 저널링 동기화 또는 WiredTiger 스냅샷과 같은 작업으로 인해 변경될 수 있습니다. 논리적 데이터에는 영향을 주지 않지만(예: 클라이언트가 액세스하는 데이터), 일부 백업 유틸리티는 이러한 변경 사항을 감지하여 경고를 표시하거나 오류로 인해 실패할 수 있습니다. MongoDB- 권장 백업 유틸리티 및 절차에 대한 자세한 내용은 자체 관리 배포서버를 위한 백업 방법을 참조하세요.

Consider a situation where db.fsyncLock() has been issued two times. The following db.fsyncUnlock() operation reduces the locks taken by db.fsyncLock() by 1:

db.fsyncUnlock()

연산은 다음 문서를 반환합니다.

{ "info" : "fsyncUnlock completed", "lockCount" : Long(1), "ok" : 1 }

lockCount 가 0보다 크면 mongod 인스턴스가 쓰기에 대해 잠깁니다. 쓰기에 대한 인스턴스의 잠금을 해제하려면 db.fsyncLock() 를 다시 실행합니다.

db.fsyncUnlock()

연산은 다음 문서를 반환합니다.

{ "info" : "fsyncUnlock completed", "lockCount" : Long(0), "ok" : 1 }

mongod 인스턴스는 쓰기에 대해 잠금 해제됩니다.

이 페이지 평가하기

이 페이지의 내용