[SERVER-77679] Untimestamped write assertion hit when running with recoverFromOplogAsStandalone=true Created: 01/Jun/23  Updated: 29/Oct/23  Resolved: 16/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc6

Type: Bug Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Execution NAMR Team 2023-06-26
Participants:

 Description   

max.hirschhorn@mongodb.com was inspecting a build failure and tried to launch mongod with --setParameter recoverFromOplogAsStandalone=true, and ran into the following error:

{"t":{"$date":"2023-06-01T04:44:34.289+00:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"LogicalSessionCacheReap","msg":"WiredTiger error message","attr":{"error":22,"message":{"ts_sec":1685594674,"ts_usec":289706,"thread":"16346:0x7f1480455700","session_name":"WT_SESSION.commit_transaction","category":"WT_VERB_DEFAULT","category_id":10,"verbose_level":"ERROR","verbose_level_id":-3,"msg":"__txn_timestamp_usage_check:873:file:index-20-1468040283224572967.wt: unexpected timestamp usage: no timestamp provided for an update to a table configured to always use timestamps once they are first used","error_str":"Invalid argument","error_code":22}}}
{"t":{"$date":"2023-06-01T04:44:34.289+00:00"},"s":"F",  "c":"ASSERT",   "id":23083,   "ctx":"LogicalSessionCacheReap","msg":"Invariant failure","attr":{"expr":"wtRet","error":"BadValue: 22: Invalid argument","file":"src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp","line":377}}
{"t":{"$date":"2023-06-01T04:44:34.289+00:00"},"s":"F",  "c":"ASSERT",   "id":23084,   "ctx":"LogicalSessionCacheReap","msg":"\n\n***aborting after invariant() failure\n\n"}

This is a background thread doing untimestamped writes on the config.transactions collection.

Even though allowUnsafeUntimestampedWrites=true was used, the error still fired because we assumed there would be no untimestamped writes when running with recoverFromOplogAsStandalone=true, but that's not true.



 Comments   
Comment by Githook User [ 21/Jun/23 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-77679 Skip starting LogicalSessionCacheReap thread when using recoverFromOplogAsStandalone=true

(cherry picked from commit 5c9e6404becc564d16857a869a5b5cb2e2bb0f1d)
Branch: v7.0
https://github.com/mongodb/mongo/commit/4486533b63999b43b78a761804961858018bdefb

Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-77679 Skip starting LogicalSessionCacheReap thread when using recoverFromOplogAsStandalone=true
Branch: master
https://github.com/mongodb/mongo/commit/5c9e6404becc564d16857a869a5b5cb2e2bb0f1d

Generated at Thu Feb 08 06:36:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.