[SERVER-39043] Query failed with error code 251 and error message 'Transaction 1 has been aborted.' Created: 16/Jan/19  Updated: 23/Jan/19  Resolved: 23/Jan/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.4
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Krishna Maske Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi

I have the following Mongo DB 4.0.4 running with replica set and trying to implement the retry with async approach.When i m running the application i m getting UncategorisedMongoDbException and after handling of this exception.I m getting Query failed with error code 251.

I tried to find the root cause for the exception but not able to.I just want to know the reason behind this error.



 Comments   
Comment by Eric Sedor [ 17/Jan/19 ]

Thanks Krishna. For help working through how to use transactions and handle errors the best place to start would be to post on Stack Overflow with the mongodb tag or for a question like this involving more discussion, on the mongodb-user group.

To investigate a potential bug or a feature request for the MongoDB core server, we would need you to clarify those steps. In particular, we'd be interested in exact operations and the exact responses returned by the server, so that we can confirm these results are either incorrect or need to change. Does this make sense?

Comment by Krishna Maske [ 17/Jan/19 ]

Steps to reproduce the error.

1>Initiate the  transaction with ReactiveMongoTemplate 

2>Used the ReactiveMongoOperations to perform the insert/update operations.

3>Try to achieve the concurrency with Mongo 4.0.4

3>Perform the load testing for concurrent request.

4>For write conflict error retry the operations again.

5>In first retry i m getting the write conflict error and in second retry i m getting mongo query exception.

As mentioned in above comment that the transaction is closed.Can we retry the same transaction in Mongo 4.0.4 if any error?

Comment by Eric Sedor [ 16/Jan/19 ]

Error Code 251 is NoSuchTransaction. If after examining the implementation you feel this response is incorrect, can you please provide an exact sequence of steps to reproduce the error?

Generated at Thu Feb 08 04:50:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.