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

killOp(데이터베이스 명령)

killOp

Terminates an operation as specified by the operation ID. mongosh provides the db.killOp() helper. To find operations and their corresponding IDs, see $currentOp or db.currentOp().

killOp 명령은 admin 데이터베이스에 대해 실행해야 합니다.

killOp를 실행하려면 db.runCommand( { <command> } ) 메서드를 사용합니다.

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

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

중요

이 명령은 모든 MongoDB Atlas 클러스터에서 제한적으로 지원 됩니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.

명령의 형식은 다음과 같습니다.

db.adminCommand(
{
killOp: 1,
op: <opid>,
comment: <any>
}
)
Parameter
유형
설명

op

숫자

작업 ID입니다.

comment

any

선택 사항. 이 명령에 첨부할 사용자 제공 코멘트입니다. 설정되면 이 설명은 다음 위치에서 이 명령의 레코드와 함께 표시됩니다.

댓글은 유효한 모든 BSON types (문자열, 정수, 객체, 배열 등)이 될 수 있습니다.

경고

Terminate running operations with extreme caution. Only use killOp to terminate operations initiated by clients and do not terminate internal database operations.

Do not use killOp to terminate an in-progress index builds in replica sets or sharded clusters. Use dropIndexes on the primary to drop the index. See Stop In-Progress Index Builds.

authorization 으로 실행되는 시스템에서 사용자가 소유하지 않은 조치를 종료하려면 사용자에게 killop 권한 조치가 포함된 액세스 권한이 있어야 합니다.

mongod 인스턴스에서는 사용자가 killop 권한 조치 없이도 자신의 작업을 종료할 수 있습니다.

The killOp command can be run on a mongos and can kill queries (i.e. read operations) that span shards in a cluster. The killOp command from the mongos does not propagate to the shards when the operation to be killed is a write operation.

mongos에서 활성화된 샤딩 작업을 나열하는 방법에 관한 정보는 $currentOplocalOps 매개변수에서 확인 가능합니다.

샤드 cluster에서의 작업 종료에 대한 자세한 내용 및 예시는 다음을 참조하세요.

The following example uses killOp to target the running operation with opid 3478.

db.adminCommand( { "killOp": 1, "op": 3478 } )

이 연산은 다음과 같은 결과를 반환합니다.

{ "info" : "attempting to kill op", "ok" : 1 }

killOp reports success if it succeeded in marking the specified operation for termination. Operations may not actually be terminated until they reach an appropriate interruption point. Use $currentOp or db.currentOp() to confirm the target operation was terminated.

이 페이지 평가하기