Alice and Bob are both on call. Their two leave requests arrive at the same moment, and each runs request_leave in its own transaction. Both transactions start from the same snapshot, in which Alice and Bob are on call, and each transaction writes the row that request_leave returns. The database uses snapshot isolation: a transaction reads only its own snapshot, and writes to different rows do not conflict.
Read rotation.py. After both transactions commit, how many doctors remain on call?