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

fsyncUnlock (데이터베이스 명령)

fsyncUnlock

서버 또는 cluster의 잠금 횟수를 줄입니다. 쓰기 작업을 활성화하려면 잠금 횟수가 0이어야 합니다.

MongoDB 7.1 부터 시작( 7.0.2 부터 사용 가능), 6.0.11 및 5.0.22) fsync 및 fsyncUnlock 명령을 mongos 에서 실행하여 샤드 클러스터를 잠그고 잠금 해제할 수 있습니다.

백업 작업을 완료한 후 쓰기 차단을 해제하려면 이 명령을 사용합니다.

중요

Servers maintain an fsync lock count. The fsync command with the lock field set to true increments the lock count while the fsyncUnlock command decrements it. To enable writes on a locked server or cluster, call the fsyncUnlock command until the lock count reaches zero.

fsyncUnlock is an administrative operation. Typically you will use fsyncUnlock following a database backup operation.

팁

In mongosh, this command can also be run through the db.fsyncUnlock() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

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

명령은 다음과 같은 구문을 가집니다:

db.adminCommand(
{
fsyncUnlock: 1,
comment: <any>
}
)

comment 필드는 선택 사항이며 모든 데이터 유형의 주석을 포함할 수 있습니다.

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

필드
설명

info

작업 상태에 대한 정보

lockCount

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

ok

상태 코드입니다.

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

db.adminCommand( { fsyncUnlock: 1 } )

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

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

lockCount 가 0보다 크면 mongod 인스턴스가 쓰기에 대해 잠깁니다. 쓰기를 위해 인스턴스의 잠금을 해제하려면 잠금 해제 작업을 다시 실행합니다.

db.adminCommand( { fsyncUnlock: 1 } )

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

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

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

이 페이지 평가하기

이 페이지의 내용