|
Suppose two threads have reached this point in waitForDurable:
https://github.com/10gen/mongo/blob/05d6797149cdae13a26693371ccd7b5b8e4aaadd/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp#L332
Each has obtained a journal token, one of which is older than the other. If the thread with the older token proceeds first, the thread with the newer token will exit here:
https://github.com/10gen/mongo/blob/05d6797149cdae13a26693371ccd7b5b8e4aaadd/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp#L340
without having called onDurable on the newer token, resulting in the newer token not being marked durable (though it is). I think this can be fixed by calling onDurable in the early exit path.
This was discovered during code inspection.
|