While working on the WT_NOTFOUND issue encountered by a number of users recently we've been looking at one particular invariant:
{"t":\{"$date":"2020-10-05T22:25:46.854+00:00"},"s":"F", "c":"-", "id":23083, "ctx":"conn503635","msg":"Invariant failure","attr":\{"expr":"ret","error":"UnknownError: -31803: WT_NOTFOUND: item not found","file":"src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp","line":1600}}
This invariant has proven to be very useful however on a number of occasions we've wanted to figure out which collection was being operated on when this invariant was hit (and a few other bits of info).
As such I'd like this invariant and perhaps other to log more information. For this one in particular I'd say the following pieces of information would be helpful:
- The collection name (i.e. the one the user set not the collection-blah.wt)
- The key
- The read timestamp
Open for feedback.