summaryrefslogtreecommitdiff
path: root/src/mongo/db/read_write_concern_provenance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/read_write_concern_provenance.h')
-rw-r--r--src/mongo/db/read_write_concern_provenance.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/read_write_concern_provenance.h b/src/mongo/db/read_write_concern_provenance.h
index 0679b311821..51e49121c78 100644
--- a/src/mongo/db/read_write_concern_provenance.h
+++ b/src/mongo/db/read_write_concern_provenance.h
@@ -116,6 +116,13 @@ public:
}
/**
+ * Returns true if the RWC was an implicit default.
+ */
+ const bool isImplicitDefault() const {
+ return hasSource() && *getSource() == Source::implicitDefault;
+ }
+
+ /**
* Sets the source of this provenance. In order to prevent accidental clobbering of provenance
* with incorrect values, a source cannot change during the provenance's lifetime, except for
* the initial transition from kUnset to some other Source value.