void MakeWritable() { if (_writing) { return; } if (_preapprovedWriting) { _writing = true; _preapprovedWriting = false; return; } if (_readOnly) { throw new BTDBTransactionRetryException("Cannot write from readOnly transaction"); } var oldBTreeRoot = BtreeRoot; _btreeRoot = _keyValueDB.MakeWritableTransaction(this, oldBTreeRoot); _btreeRoot.DescriptionForLeaks = _descriptionForLeaks; _writing = true; InvalidateCurrentKey(); }