Hi All,
I am using the spring-data-mongodb-4.2.1 library and have created a repository using the MongoRepository.class.
I attempted to save data to a collection using the repository.save(obj) method, which was called inside a method annotated with @Transactional. Occasionally,
I encounter the error ‘writeConcern is not allowed within a multi-statement transaction’. This issue is intermittent and difficult to reproduce. Interestingly, the save operation succeeds if I call the API a second time.
Do you have any suggestion?