summaryrefslogtreecommitdiff
path: root/src/mongo/db/views
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2018-04-24 16:37:18 -0400
committerJudah Schvimer <judah@mongodb.com>2018-05-03 12:01:09 -0400
commitdd45579fef2bf4e212161d1e3d97666a80b08bbf (patch)
treeb12df773845f5994240d8c50b0e171f277beb12a /src/mongo/db/views
parentb1a7cffd3f151efe4d47864c89cf5c7cf9e884cc (diff)
downloadmongo-dd45579fef2bf4e212161d1e3d97666a80b08bbf.tar.gz
SERVER-34580 Plumb commit time to commit handlers when available
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r--src/mongo/db/views/durable_view_catalog.cpp3
-rw-r--r--src/mongo/db/views/view_catalog.cpp6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp
index 199c201f07c..b0076f03926 100644
--- a/src/mongo/db/views/durable_view_catalog.cpp
+++ b/src/mongo/db/views/durable_view_catalog.cpp
@@ -57,7 +57,8 @@ void DurableViewCatalog::onExternalChange(OperationContext* opCtx, const Namespa
Database* db = DatabaseHolder::getDatabaseHolder().get(opCtx, name.db());
if (db) {
- opCtx->recoveryUnit()->onCommit([db]() { db->getViewCatalog()->invalidate(); });
+ opCtx->recoveryUnit()->onCommit(
+ [db](boost::optional<Timestamp>) { db->getViewCatalog()->invalidate(); });
}
}
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp
index 1a029f0d5c4..16c660d8e5c 100644
--- a/src/mongo/db/views/view_catalog.cpp
+++ b/src/mongo/db/views/view_catalog.cpp
@@ -162,7 +162,8 @@ Status ViewCatalog::_createOrUpdateView_inlock(OperationContext* opCtx,
});
// We may get invalidated, but we're exclusively locked, so the change must be ours.
- opCtx->recoveryUnit()->onCommit([this]() { this->_valid.store(true); });
+ opCtx->recoveryUnit()->onCommit(
+ [this](boost::optional<Timestamp>) { this->_valid.store(true); });
return Status::OK();
}
@@ -377,7 +378,8 @@ Status ViewCatalog::dropView(OperationContext* opCtx, const NamespaceString& vie
});
// We may get invalidated, but we're exclusively locked, so the change must be ours.
- opCtx->recoveryUnit()->onCommit([this]() { this->_valid.store(true); });
+ opCtx->recoveryUnit()->onCommit(
+ [this](boost::optional<Timestamp>) { this->_valid.store(true); });
return Status::OK();
}