[SERVER-35983] Write with readOnly boolean enabled Created: 05/Jul/18  Updated: 27/Oct/23  Resolved: 06/Jul/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Daniel Gottlieb (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Storage NYC 2018-07-30
Participants:

 Description   

While working on SERVER-26671, I introduced an assertion which prevented the encryption logic from generating IVs while in readOnly mode. Because we do not perform writes while the readOnly flag is active, we should never generate IVs. I encountered a couple of failures which suggest that servers started with the recoverFromOplogAsStandalone setParameter enable readOnly mode, but then later do writes which hit the assertion.



 Comments   
Comment by Daniel Gottlieb (Inactive) [ 06/Jul/18 ]

spencer.jackson and I talked about this ticket. recoverFromOplogAsStandalone is a setting that opens up WT without passing in readOnly, but then flips the mongod queryableBackupMode option after replication recovery completes. With this patch, the ESE is choosing to read mongod's queryableBackupMode on initialization (still false) and then invarianting queryableBackupMode is false when deciding to increment the GSM (due to writes going to disk). However, the recoverFromOplogAsStandalone logic flips the queryableBackupMode flag between these operations.

We decided to try and change the patch to have the ESE code note whether the server is in read-only mode on initialization and use that value to determine whether to increment the GSM.

Generated at Thu Feb 08 04:41:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.