summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/grid.cpp')
-rw-r--r--src/mongo/s/grid.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 6570ca0c751..65d8b1c1f8c 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -44,15 +44,17 @@
namespace mongo {
+namespace {
// Global grid instance
-Grid grid;
+const auto grid = ServiceContext::declareDecoration<Grid>();
+}
Grid::Grid() = default;
Grid::~Grid() = default;
Grid* Grid::get(ServiceContext* serviceContext) {
- return &grid;
+ return &grid(serviceContext);
}
Grid* Grid::get(OperationContext* operationContext) {