killOp 명령을 사용하여 장기 실행 쿼리를 종료할 수 있습니다. 자세한 내용은 killOp 를 참조하세요. Atlas Data Federation:
op매개변수 값이 ObjectId입니다.comment매개변수는 지원되지 않습니다.
If you're an Admin user or a user with the killop privilege, you can terminate any query on a federated database. The user who issued the query can also terminate the query. To run this command, use db.runCommand(). You must run killOp against the admin database.
구문
db.runCommand({ "killOp": 1, "op": ObjectId(<hexadecimal>) })
옵션
필드 | 유형 | 설명 | 필요성 |
|---|---|---|---|
| Unique identifier, in ObjectId format, of the operation to terminate. You can use $currentOp to retrieve the | 필수 사항 |
출력
killOp 는 지정된 작업을 종료로 표시하는 데 성공하면 다음을 반환합니다.
{ "info" : "attempting to kill op", "ok" : 1 }
출력은 종료 중인 작업이 현재 실행 중인지 여부에 관계없이 동일합니다. $currentOp 를 사용하여 작업이 종료되었는지 확인할 수 있습니다.
예시
아래 예에서는 opid 값이 ObjectId("1635fad364c529820c6f9e76") 인 쿼리가 실행 중이라고 가정합니다. 다음 명령은 이 쿼리를 종료합니다.
use admin db.runCommand({ "killOp": 1, "op": ObjectId("1635fad364c529820c6f9e76") })
이전 명령은 다음을 반환합니다.
{ "info" : "attempting to kill op", "ok" : 1 }