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

abortTransaction (데이터베이스 명령)

abortTransaction

다중 문서 트랜잭션을 종료하고 트랜잭션 내 작업으로 인해 변경된 모든 데이터를 롤백합니다. 즉, 트랜잭션 작업으로 인해 변경된 내용을 저장하지 않고 트랜잭션이 종료됩니다.

팁

In mongosh, this command can also be run through the Session.abortTransaction() 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.

To run the abortTransaction, the command must be run against the admin database and run within a Session().

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

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

참고

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

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

db.adminCommand(
{
abortTransaction: 1,
txnNumber: <long>,
writeConcern: <document>,
autocommit: false,
comment: <any>
}
)

트랜잭션이 중단되면 트랜잭션 쓰기로 인한 모든 데이터 변경 사항이 표시되지 않고 삭제되며 트랜잭션이 종료됩니다.

감사와 함께 실행하는 경우 중단된 트랜잭션의 작업은 계속 감사됩니다.

이 페이지 평가하기

이 페이지의 내용