The classic execution engine has logic (implemented with the NEED_YIELD return code) to allow query execution to tolerate a WriteConflictException thrown from the storage layer. In short, if WCE is thrown by an operation on a storage cursor, the exception is caught and propagated to the PlanExecutorImpl via NEED_YIELD. The plan executor undergoes the yielding process and then picks up query execution where it left off.
No such logic exists today in the SBE engine, and SBE is generally unable to resume if an arbitrary exception is thrown. We should investigate whether SBE actually needs to tolerate SBE in the way that the classic engine does, and if so figure out how this could be achieved. My understanding is that WCE during find operations is either exceedingly rare or impossible (it is called a "write conflict" after all), so perhaps we could just retry the query from the beginning with a retry loop at a very high level?
- is duplicated by
-
SERVER-55101 [SBE] WriteConflictException thrown in jstests/noPassthrough/write_conflict_wildcard.js
- Closed