As mentioned in the docuemnt, a write to a prepared document should block
Assume there is a transaction txn2 want to update doc1, and doc1 is prepared by another transaction txn1.
According to this source code, txn1 only waits for a read operation.
When txn1 commits or aborts, txn2 make progress for updating.
According to the code in wiredtiger, a update operation to a prepared upd causes transaction rollback.
There will be a situation as follows:
Concurrent transaction txn3 may update also prepare the document. If txn3 prepared doc1 before txn2 update doc1, txn2's update will failed, which contradicts the content in the document.
The events could be like this:
txn2 will update after txn1 aborting, otherwise txn1 will rollback dute to txn2's update, so I guess when updating RecordStore, wirte lock are acquired, otherwise something bad will happen.