![]() |
Storage Engine API
|
Tracks all write operations on the private view so they can be journaled. More...
#include <dur_commitjob.h>
Tracks all write operations on the private view so they can be journaled.
Public Member Functions | |
CommitJob () | |
~CommitJob () | |
void | noteOp (std::shared_ptr< DurOp > p) |
Note an operation other than a "basic write". More... | |
void | note (void *p, int len) |
Record/note an intent to write. More... | |
bool | hasWritten () const |
When this value is false we don't have to do any group commit. More... | |
void | committingReset () |
We use the commitjob object over and over, calling committingReset() rather than reconstructing. More... | |
size_t | bytes () const |
We check how much written and if it is getting to be a lot, we commit sooner. More... | |
const WriteIntentsVector & | getIntentsSorted () |
Sorts the internal list of write intents so that overlapping and duplicate items can be merged. More... | |
const DurOpsVector & | ops () const |
Public Attributes | |
SimpleMutex | groupCommitMutex |
Private Member Functions | |
MONGO_DISALLOW_COPYING (CommitJob) | |
void | _insertWriteIntent (void *p, int len) |
Private Attributes | |
bool | _hasWritten |
Already< 127 > | _alreadyNoted |
WriteIntentsVector | _intents |
DurOpsVector | _durOps |
size_t | _lastNotedPos |
size_t | _bytes |
uint64_t | _lastComplainMs |
unsigned | _complains |
mongo::dur::CommitJob::CommitJob | ( | ) |
mongo::dur::CommitJob::~CommitJob | ( | ) |
|
inline |
We check how much written and if it is getting to be a lot, we commit sooner.
void mongo::dur::CommitJob::committingReset | ( | ) |
We use the commitjob object over and over, calling committingReset() rather than reconstructing.
|
inline |
Sorts the internal list of write intents so that overlapping and duplicate items can be merged.
We do the sort here so the caller receives something they must keep const from their POV.
|
inline |
When this value is false we don't have to do any group commit.
|
private |
Record/note an intent to write.
NOTE: Not thread safe. Requires the mutex to be locked.
Note an operation other than a "basic write".
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
SimpleMutex mongo::dur::CommitJob::groupCommitMutex |