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

killSessions (데이터베이스 명령)

killSessions

The killSessions command kills the specified sessions. If access control is enabled, the command only kills the sessions owned by the user. [1]

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

db.runCommand(
{
killSessions: [ { id : <UUID> }, ... ]
}
)

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

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

중요

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

The command takes an array of documents that specify the UUID portion of the session id. Specify an empty array [ ] to kill all sessions, or if access control is enabled, all sessions owned by the user. [1]

기존 세션을 보려면 $listSessions 작업 또는 $listLocalSessions 를 참조하세요.

[1](1, 2) The killSessions operation ignores sessions that have transactions in prepared state. See Behavior for details.

MongoDB concatenates each of the specified UUIDs with the hash of the authenticated user credentials to identify the user's sessions to kill. If the user has no session that match, the killSessions has no effect.

세션을 종료하면 세션에서 진행 중인 모든 작업이 종료되고 이러한 작업과 관련된 열려 있는 커서가 모두 닫힙니다.

종료된 세션은 여전히 현재 세션으로 나열될 수 있으며, 향후 작업에서 종료된 세션을 사용할 수 있습니다. 기존 세션을 보려면 $listSessions 작업 또는 $listLocalSessions 를 참조하세요.

The killSessions operation ignores sessions that have Transactions in prepared state. Transactions in prepared state refer to transactions with write operations that span multiple shards whose commit coordinator has completed the "sendingPrepare" action.

다음 작업은 사용자에 대해 지정된 세션을 종료합니다.

db.runCommand( { killSessions: [ { id: UUID("f9b3d8d9-9496-4fff-868f-04a6196fc58a") } ] } )