Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90142

Make jstests included in sharded_jscore_txns_sharded_collections_with_config_transitions retry transactions

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • 155

      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.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: