summaryrefslogtreecommitdiff
path: root/src/mongo/db/lasterror.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-07-24 15:59:24 -0400
committerMathias Stearn <mathias@10gen.com>2017-08-17 22:13:09 -0400
commit583127818f1ead21b67a57eb117b9678232e5472 (patch)
treed64e7927045a9b33d4e248acb48433903e3bb340 /src/mongo/db/lasterror.h
parent112982eeaddf92cbc14be655061200e23069250a (diff)
downloadmongo-583127818f1ead21b67a57eb117b9678232e5472.tar.gz
SERVER-28510 Close incoming mongod connection on NotMaster error when handling fire-and-forget command
Diffstat (limited to 'src/mongo/db/lasterror.h')
-rw-r--r--src/mongo/db/lasterror.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mongo/db/lasterror.h b/src/mongo/db/lasterror.h
index 27ce978d2b6..ee450089595 100644
--- a/src/mongo/db/lasterror.h
+++ b/src/mongo/db/lasterror.h
@@ -50,9 +50,14 @@ public:
void reset(bool valid = false);
/**
- * when db receives a message/request, call this
+ * when db receives a top level message/request, call this
*/
- void startRequest();
+ void startTopLevelRequest();
+
+ /**
+ * when DBDirectClient receives a message/request, call this
+ */
+ void startDirectClientRequest();
/**
* Disables error recording for the current operation.
@@ -86,6 +91,10 @@ public:
return _nPrev;
}
+ bool hadNotMasterError() const {
+ return _hadNotMasterError;
+ }
+
class Disabled {
public:
explicit Disabled(LastError* le) : _le(le), _prev(le->_disabled) {
@@ -115,6 +124,7 @@ private:
int _nPrev = 1;
bool _valid = false;
bool _disabled = false;
+ bool _hadNotMasterError = false;
};
} // namespace mongo