summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2015-06-15 17:27:49 -0400
committerMisha Tyulenev <misha@mongodb.com>2015-06-15 17:55:34 -0400
commit67da0d34a17c4707cd70dd23588c5a0b4b1da2c0 (patch)
treec5638508cca3022188977f0f9a198b320680b314 /src/mongo/db
parente0286fd21111f466e86cafb3c7bc0e12203b6fa7 (diff)
downloadmongo-67da0d34a17c4707cd70dd23588c5a0b4b1da2c0.tar.gz
address feedback: remove isTTL and expireAfterSeconds
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/exec/count_scan.cpp2
-rw-r--r--src/mongo/db/exec/index_scan.cpp2
-rw-r--r--src/mongo/db/exec/plan_stats.h8
-rw-r--r--src/mongo/db/index/index_descriptor.h19
-rw-r--r--src/mongo/db/query/explain.cpp13
5 files changed, 0 insertions, 44 deletions
diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp
index 5374305a62c..c002e72e9ca 100644
--- a/src/mongo/db/exec/count_scan.cpp
+++ b/src/mongo/db/exec/count_scan.cpp
@@ -56,8 +56,6 @@ namespace mongo {
_specificStats.isUnique = _params.descriptor->unique();
_specificStats.isSparse = _params.descriptor->isSparse();
_specificStats.isPartial = _params.descriptor->isPartial();
- _specificStats.isTTL = _params.descriptor->isTTL();
- _specificStats.expireAfterSeconds = _params.descriptor->expireAfterSeconds();
_specificStats.indexVersion = _params.descriptor->version();
// endKey must be after startKey in index order since we only do forward scans.
diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp
index 125fd896773..0dda64c99d2 100644
--- a/src/mongo/db/exec/index_scan.cpp
+++ b/src/mongo/db/exec/index_scan.cpp
@@ -81,8 +81,6 @@ namespace mongo {
_specificStats.isUnique = _params.descriptor->unique();
_specificStats.isSparse = _params.descriptor->isSparse();
_specificStats.isPartial = _params.descriptor->isPartial();
- _specificStats.isTTL = _params.descriptor->isTTL();
- _specificStats.expireAfterSeconds = _params.descriptor->expireAfterSeconds();
_specificStats.indexVersion = _params.descriptor->version();
}
diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h
index d7fbc82a193..3504355f071 100644
--- a/src/mongo/db/exec/plan_stats.h
+++ b/src/mongo/db/exec/plan_stats.h
@@ -243,8 +243,6 @@ namespace mongo {
isPartial(false),
isSparse(false),
isUnique(false),
- isTTL(false),
- expireAfterSeconds(0),
keysExamined(0) { }
virtual ~CountScanStats() { }
@@ -266,8 +264,6 @@ namespace mongo {
bool isPartial;
bool isSparse;
bool isUnique;
- bool isTTL;
- long long expireAfterSeconds;
size_t keysExamined;
@@ -368,8 +364,6 @@ namespace mongo {
isPartial(false),
isSparse(false),
isUnique(false),
- isTTL(false),
- expireAfterSeconds(0),
dupsTested(0),
dupsDropped(0),
seenInvalidated(0),
@@ -409,8 +403,6 @@ namespace mongo {
bool isPartial;
bool isSparse;
bool isUnique;
- bool isTTL;
- long long expireAfterSeconds;
size_t dupsTested;
size_t dupsDropped;
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h
index 6ad769a38f5..742e5a3ea16 100644
--- a/src/mongo/db/index/index_descriptor.h
+++ b/src/mongo/db/index/index_descriptor.h
@@ -69,8 +69,6 @@ namespace mongo {
_sparse(infoObj["sparse"].trueValue()),
_unique( _isIdIndex || infoObj["unique"].trueValue() ),
_partial(!infoObj["partialFilterExpression"].eoo()),
- _isTTL(!infoObj["expireAfterSeconds"].eoo()),
- _expireAfterSeconds(0), // valid value if isTTL is set
_cachedEntry( NULL )
{
_indexNamespace = makeIndexNamespace( _parentNS, _indexName );
@@ -80,16 +78,6 @@ namespace mongo {
if ( e.isNumber() ) {
_version = e.numberInt();
}
-
- if (_isTTL) {
- BSONElement expireAfterSecondsEl = infoObj["expireAfterSeconds"];
- if (!expireAfterSecondsEl.isNumber()) {
- _isTTL = false;
- }
- else {
- _expireAfterSeconds = expireAfterSecondsEl.numberLong();
- }
- }
}
~IndexDescriptor() {
@@ -142,11 +130,6 @@ namespace mongo {
// Is this a partial index?
bool isPartial() const { return _partial; }
- // If expireAfterSeconds value is set and valid
- bool isTTL() const { return _isTTL; }
-
- long long expireAfterSeconds() const { return _expireAfterSeconds; }
-
// Is this index multikey?
bool isMultikey( OperationContext* txn ) const {
_checkOk();
@@ -222,8 +205,6 @@ namespace mongo {
bool _sparse;
bool _unique;
bool _partial;
- bool _isTTL;
- long long _expireAfterSeconds;
int _version;
// only used by IndexCatalogEntryContainer to do caching for perf
diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp
index a6989ca1d36..8eeb44d4088 100644
--- a/src/mongo/db/query/explain.cpp
+++ b/src/mongo/db/query/explain.cpp
@@ -292,12 +292,6 @@ namespace mongo {
bob->appendBool("isUnique", spec->isUnique);
bob->appendBool("isSparse", spec->isSparse);
bob->appendBool("isPartial", spec->isPartial);
- if (spec->isTTL) {
- bob->append("expireAfterSeconds", spec->expireAfterSeconds);
- }
- else {
- bob->appendBool("isTTL", false);
- }
bob->append("indexVersion", spec->indexVersion);
}
else if (STAGE_DELETE == stats.stageType) {
@@ -356,13 +350,6 @@ namespace mongo {
bob->appendBool("isUnique", spec->isUnique);
bob->appendBool("isSparse", spec->isSparse);
bob->appendBool("isPartial", spec->isPartial);
- if (spec->isTTL) {
- bob->append("expireAfterSeconds", spec->expireAfterSeconds);
- }
- else {
- bob->appendBool("isTTL", false);
- }
-
bob->append("indexVersion", spec->indexVersion);
bob->append("direction", spec->direction > 0 ? "forward" : "backward");