-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
Repl 2019-07-01
-
21
This is a bug when commitTransaction is being retried. A previous commitPreparedTransaction reacquires the RSTL and then fails due to a uassert. When it fails, it doesn't release the RSTL due to two phase locking, rather stashing the RSTL. A prepared transaction cannot hold the RSTL while stashed or else a deadlock with stepdown is possible. We should release the RSTL if we do not commit the prepared transaction (we can't fail but we can choose not to commit).