summaryrefslogtreecommitdiff
path: root/db/index.h
diff options
context:
space:
mode:
Diffstat (limited to 'db/index.h')
-rw-r--r--db/index.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/index.h b/db/index.h
index 8578ed3..d13bd1d 100644
--- a/db/index.h
+++ b/db/index.h
@@ -145,6 +145,13 @@ namespace mongo {
const IndexSpec& getSpec() const;
+ void checkVersion() const {
+ // TODO: cache?
+ massert( 13658 ,
+ str::stream() << "using a newer index version: " << info.obj() << " v: " << info.obj().getIntField("v" ) ,
+ info.obj().getIntField("v") <= 0 );
+ }
+
string toString() const {
return info.obj().toString();
}