summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/type_collection.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2015-07-13 23:22:35 +1000
committerKevin Pulo <kevin.pulo@mongodb.com>2015-07-13 23:22:35 +1000
commit63863aefa21b33e6f84b8b466f70581dd921dba7 (patch)
tree809e4b4bcfbaa1907a34c5e43ce9e12ec4ead835 /src/mongo/s/catalog/type_collection.cpp
parent48432412d79d0712367837a12637d3682c04fddb (diff)
downloadmongo-63863aefa21b33e6f84b8b466f70581dd921dba7.tar.gz
SERVER-18796: sh.status() show 'dropped:false' colls again
Specifically: * printShardingStatus()/sh.status() show collections with missing 'dropped' field * Don't omit 'dropped:false' in config.collections * Add jstest for basic validation of printShardingStatus() output
Diffstat (limited to 'src/mongo/s/catalog/type_collection.cpp')
-rw-r--r--src/mongo/s/catalog/type_collection.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/s/catalog/type_collection.cpp b/src/mongo/s/catalog/type_collection.cpp
index 7a125e52062..1d466314edb 100644
--- a/src/mongo/s/catalog/type_collection.cpp
+++ b/src/mongo/s/catalog/type_collection.cpp
@@ -180,14 +180,11 @@ BSONObj CollectionType::toBSON() const {
}
builder.append(epoch.name(), _epoch.get_value_or(OID()));
builder.append(updatedAt.name(), _updatedAt.get_value_or(Date_t()));
+ builder.append(dropped.name(), _dropped.get_value_or(false));
// These fields are optional, so do not include them in the metadata for the purposes of
// consuming less space on the config servers.
- if (_dropped.is_initialized()) {
- builder.append(dropped.name(), _dropped.get());
- }
-
if (_keyPattern.is_initialized()) {
builder.append(keyPattern.name(), _keyPattern->toBSON());
}