ISSUE DESCRIPTION AND IMPACT
This bug affects a very specific upsert-only workload when transitioning between a replica set and a single-shard cluster topology, and affects operations performed by clients connecting directly to the shard. Note that direct-to-shard write operations are not recommended at any other time.
Specifically, write operations on single-shard clusters can fail when all of the following are true:
- Performed via direct-to-shard connections
- The namespace receiving those operations is only receiving upsert operations which resolve to insert operations
- No operations to the namespace are being issued to mongos routers
There is a known workaround (that is part of the documented and expected normal procedure of upgrading to a sharded cluster) of switching your connection string to mongos. Until then, operations may fail with the following message logged on mongod:
{"t":{"$date":"2024-09-24T10:00:00.000+00:00"},"s":"E", "c":"ASSERT", "id":4457000, "svc":"S", "ctx":"conn1","msg":"Tripwire assertion","attr":{"error":{"code":9146500,"codeName":"Location9146500","errmsg":"An update plan should never yield after having performed an upsert"},"location":"{fileName:\"src/mongo/db/query/plan_executor_impl.cpp\", line:683, functionName:\"executeUpdate\"}"}}
This issue will be corrected by SERVER-95244 in 8.0.1. If you must transition to a sharded cluster while on 8.0.0 and have an upsert-only workload, you should expect these operation failures and plan accordingly by transitioning clients to mongos routers swiftly.
DIAGNOSIS AND AFFECTED VERSIONS
- Affected Versions: 8.0.0
- Fixed Versions: 8.0.1 (upcoming)
REMEDIATION AND WORKAROUNDS
User action is required in order to remediate this issue. Impacted users should follow the below steps:
- Upgrade to a fixed version once released, or
- Update your application to only connect to the cluster through a mongos
Inserts performed as part of upsert operations issued directly to a single-shard cluster may fail with tassert 9146500 if the namespace is not receiving any other operation type or is not receiving operations issued by mongos routers.
- is caused by
-
SERVER-91465 Don't Return StaleConfig for UpdateMany on Unsplittable Collections
- Closed