Spring Boot MongoDB multi-document transactions

Spring Boot MongoDB multi-document transactions

In most cases, multi-document transaction incurs a greater performance cost over single document writes, and the availability of multi-document transactions should not be a replacement for effective schema design. For many scenarios, the denormalized data model (embedded documents and arrays) will continue to be optimal for your data and use cases. That is, for many scenarios, modeling your data appropriately will minimize the need for multi-document transactions. IMPORTANT!In most cases, multi-document transaction incurs a greater performance cost over single document writes, and the availability of multi-document transactions should not be a replacement for effective schema design. For many scenarios, thewill continue to be optimal for your data and use cases. That is, for many scenarios, modeling your data appropriately will minimize the need for multi-document transactions.

Production Considerations.

중요!

For additional transactions usage considerations (such as runtime limit and oplog size limit), see also중요! 많은 시나리오에서 비정규화된 데이터 모델(임베디드 문서 및 배열) 은 데이터 및 사용 사례에 계속 최적입니다. 즉, 많은 시나리오에서 데이터를 적절하게 모델링하면 다중 문서 트랜잭션의 필요성을 최소화할 수 있습니다. 대부분의 경우 다중 문서 트랜잭션은 단일 문서 쓰기보다 더 큰 성능 비용을 초래하며 다중 문서 트랜잭션의 가용성이 효과적인 스키마 설계를 대체해서는 안 됩니다.많은 시나리오에서은 데이터 및 사용 사례에 계속 최적입니다.즉, 많은 시나리오에서 데이터를 적절하게 모델링하면 다중 문서 트랜잭션의 필요성을 최소화할 수 있습니다.

프로덕션 고려 사항을 참조 하십시오 . 추가 트랜잭션 사용 고려 사항(예: 런타임 제한 및 oplog 크기 제한)은참조

from http://gofnrk.tistory.com/123 by ccl(A) rewrite - 2021-08-14 01:26:28