Operational Defect Database

BugZero found this defect 16 days ago.

MongoDB | 2661291

Make jstests included in sharded_jscore_txns_sharded_collections_with_config_transitions retry transactions

Last update date:

5/3/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

Many tests in jstests/core/txns/* (and possibly elsewhere) were written assuming that transactions won't fail, not even with transient errors. This was apparently fine until now, but now many of them are included in the suite sharded_jscore_txns_sharded_collections_with_config_transitions. In this new suite the config server is continuously transitioning between being a dedicated config server and being a config shard, which is equivalent to adding and removing a shard. During a transition to dedicated config server, the commit phase of a migration can happen after a transaction begins, causing a StaleConfig error later, which is a transient error and should be retried. One solution could be to go over all offending tests and make them retry transactions (possibly using the helper withTxnAndAutoRetryOnMongos or similar ones). Another solution could be to exclude all those tests until PM-1630 is completed, which would make mongoS retry automatically commands in transactions on stale version errors.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...