mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
use PDFILE_VERSION instead of VERSION since its such a common name SERVER-3671
This commit is contained in:
parent
5f7feee66c
commit
a1e68969d4
@ -237,8 +237,8 @@ namespace mongo {
|
||||
static DBDirectClient db;
|
||||
|
||||
if ( h->version == 4 && h->versionMinor == 4 ) {
|
||||
assert( VERSION == 4 );
|
||||
assert( VERSION_MINOR == 5 );
|
||||
assert( PDFILE_VERSION == 4 );
|
||||
assert( PDFILE_VERSION_MINOR == 5 );
|
||||
|
||||
list<string> colls = db.getCollectionNames( dbName );
|
||||
for ( list<string>::iterator i=colls.begin(); i!=colls.end(); i++) {
|
||||
@ -290,7 +290,7 @@ namespace mongo {
|
||||
log() << "****" << endl;
|
||||
log() << "****" << endl;
|
||||
log() << "need to upgrade database " << dbName << " with pdfile version " << h->version << "." << h->versionMinor << ", "
|
||||
<< "new version: " << VERSION << "." << VERSION_MINOR << endl;
|
||||
<< "new version: " << PDFILE_VERSION << "." << PDFILE_VERSION_MINOR << endl;
|
||||
if ( shouldRepairDatabases ) {
|
||||
// QUESTION: Repair even if file format is higher version than code?
|
||||
log() << "\t starting upgrade" << endl;
|
||||
|
@ -366,7 +366,7 @@ namespace mongo {
|
||||
|
||||
enum { HeaderSize = 8192 };
|
||||
|
||||
bool isCurrentVersion() const { return ( version == VERSION ) && ( versionMinor == VERSION_MINOR ); }
|
||||
bool isCurrentVersion() const { return ( version == PDFILE_VERSION ) && ( versionMinor == PDFILE_VERSION_MINOR ); }
|
||||
|
||||
bool uninitialized() const { return version == 0; }
|
||||
|
||||
@ -379,8 +379,8 @@ namespace mongo {
|
||||
assert( HeaderSize == 8192 );
|
||||
DataFileHeader *h = getDur().writing(this);
|
||||
h->fileLength = filelength;
|
||||
h->version = VERSION;
|
||||
h->versionMinor = VERSION_MINOR;
|
||||
h->version = PDFILE_VERSION;
|
||||
h->versionMinor = PDFILE_VERSION_MINOR;
|
||||
h->unused.set( fileno, HeaderSize );
|
||||
assert( (data-(char*)this) == HeaderSize );
|
||||
h->unusedLength = fileLength - HeaderSize - 16;
|
||||
|
4
pch.h
4
pch.h
@ -113,8 +113,8 @@ namespace mongo {
|
||||
#endif
|
||||
|
||||
// pdfile versions
|
||||
const int VERSION = 4;
|
||||
const int VERSION_MINOR = 5;
|
||||
const int PDFILE_VERSION = 4;
|
||||
const int PDFILE_VERSION_MINOR = 5;
|
||||
|
||||
enum ExitCode {
|
||||
EXIT_CLEAN = 0 ,
|
||||
|
@ -83,7 +83,7 @@ namespace mongo {
|
||||
|
||||
string mongodVersion() {
|
||||
stringstream ss;
|
||||
ss << "db version v" << versionString << ", pdfile version " << VERSION << "." << VERSION_MINOR;
|
||||
ss << "db version v" << versionString << ", pdfile version " << PDFILE_VERSION << "." << PDFILE_VERSION_MINOR;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user