chunk.h   chunk.h 
skipping to change at line 163 skipping to change at line 163
*/ */
long getPhysicalSize() const; long getPhysicalSize() const;
// //
// public constants // public constants
// //
static string chunkMetadataNS; static string chunkMetadataNS;
static int MaxChunkSize; static int MaxChunkSize;
static int MaxObjectPerChunk; static int MaxObjectPerChunk;
static bool ShouldAutoSplit;
// //
// accessors and helpers // accessors and helpers
// //
string toString() const; string toString() const;
friend ostream& operator << (ostream& out, const Chunk& c) { return (out << c.toString()); } friend ostream& operator << (ostream& out, const Chunk& c) { return (out << c.toString()); }
bool operator==(const Chunk& s) const; bool operator==(const Chunk& s) const;
bool operator!=(const Chunk& s) const { return ! ( *this == s ); } bool operator!=(const Chunk& s) const { return ! ( *this == s ); }
skipping to change at line 302 skipping to change at line 304
void createFirstChunks( const Shard& shard ) const; // only call fr om DBConfig::shardCollection void createFirstChunks( const Shard& shard ) const; // only call fr om DBConfig::shardCollection
ChunkPtr findChunk( const BSONObj& obj ) const; ChunkPtr findChunk( const BSONObj& obj ) const;
ChunkPtr findChunkOnServer( const Shard& shard ) const; ChunkPtr findChunkOnServer( const Shard& shard ) const;
const ShardKeyPattern& getShardKey() const { return _key; } const ShardKeyPattern& getShardKey() const { return _key; }
bool isUnique() const { return _unique; } bool isUnique() const { return _unique; }
void getShardsForQuery( set<Shard>& shards , const BSONObj& query ) const; void getShardsForQuery( set<Shard>& shards , const BSONObj& query ) const;
void getAllShards( set<Shard>& all ) const; void getAllShards( set<Shard>& all ) const;
void getShardsForRange(set<Shard>& shards, const BSONObj& min, cons t BSONObj& max) const; // [min, max) void getShardsForRange(set<Shard>& shards, const BSONObj& min, cons t BSONObj& max, bool fullKeyReq = true) const; // [min, max)
string toString() const; string toString() const;
ShardChunkVersion getVersion( const Shard& shard ) const; ShardChunkVersion getVersion( const Shard& shard ) const;
ShardChunkVersion getVersion() const; ShardChunkVersion getVersion() const;
/** /**
* this is just an increasing number of how many ChunkManagers we h ave so we know if something has been updated * this is just an increasing number of how many ChunkManagers we h ave so we know if something has been updated
*/ */
unsigned long long getSequenceNumber() const { return _sequenceNumb er; } unsigned long long getSequenceNumber() const { return _sequenceNumb er; }
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 extsort.h   extsort.h 
skipping to change at line 79 skipping to change at line 79
return _compare(*extSortIdxInterface, *l, *r, extSortOrder); return _compare(*extSortIdxInterface, *l, *r, extSortOrder);
}; };
class FileIterator : boost::noncopyable { class FileIterator : boost::noncopyable {
public: public:
FileIterator( string file ); FileIterator( string file );
~FileIterator(); ~FileIterator();
bool more(); bool more();
Data next(); Data next();
private: private:
MemoryMappedFile _file; bool _read( char* buf, long long count );
char * _buf;
char * _end; int _file;
unsigned long long _length;
unsigned long long _readSoFar;
}; };
public: public:
typedef FastArray<Data> InMemory; typedef FastArray<Data> InMemory;
class Iterator : boost::noncopyable { class Iterator : boost::noncopyable {
public: public:
Iterator( BSONObjExternalSorter * sorter ); Iterator( BSONObjExternalSorter * sorter );
 End of changes. 1 change blocks. 
3 lines changed or deleted 5 lines changed or added


 listen.h   listen.h 
skipping to change at line 126 skipping to change at line 126
long long now = Listener::getElapsedTimeMillis(); long long now = Listener::getElapsedTimeMillis();
if ( now - _last > _ms ) { if ( now - _last > _ms ) {
_last = now; _last = now;
return true; return true;
} }
return false; return false;
} }
void resetLastTime() {
_last = Listener::getElapsedTimeMillis();
}
private: private:
int _h; int _h;
int _ms; int _ms;
unsigned long long _pings; unsigned long long _pings;
long long _last; long long _last;
}; };
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 mmap.h   mmap.h 
skipping to change at line 277 skipping to change at line 277
inline void MemoryMappedFile::makeWritable(void *_p, unsigned len) { inline void MemoryMappedFile::makeWritable(void *_p, unsigned len) {
size_t p = (size_t) _p; size_t p = (size_t) _p;
unsigned a = p/ChunkSize; unsigned a = p/ChunkSize;
unsigned b = (p+len)/ChunkSize; unsigned b = (p+len)/ChunkSize;
for( unsigned i = a; i <= b; i++ ) { for( unsigned i = a; i <= b; i++ ) {
if( !writable.get(i) ) { if( !writable.get(i) ) {
makeChunkWritable(i); makeChunkWritable(i);
} }
} }
} }
extern void* getNextMemoryMappedFileLocation( unsigned long long mmfSiz e );
#endif #endif
} // namespace mongo } // namespace mongo
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 parallel.h   parallel.h 
skipping to change at line 239 skipping to change at line 239
virtual bool more(); virtual bool more();
virtual BSONObj next(); virtual BSONObj next();
virtual string type() const { return "ParallelSort"; } virtual string type() const { return "ParallelSort"; }
protected: protected:
void _finishCons(); void _finishCons();
void _init(); void _init();
virtual void _explain( map< string,list<BSONObj> >& out ); virtual void _explain( map< string,list<BSONObj> >& out );
int _numServers; int _numServers;
int _lastFrom;
set<ServerAndQuery> _servers; set<ServerAndQuery> _servers;
BSONObj _sortKey; BSONObj _sortKey;
FilteringClientCursor * _cursors; FilteringClientCursor * _cursors;
int _needToSkip; int _needToSkip;
}; };
/** /**
* tools for doing asynchronous operations * tools for doing asynchronous operations
* right now uses underlying sync network ops and uses another thread * right now uses underlying sync network ops and uses another thread
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 pch.h   pch.h 
skipping to change at line 131 skipping to change at line 131
EXIT_SHARDING_ERROR = 5 , EXIT_SHARDING_ERROR = 5 ,
EXIT_KILL = 12 , EXIT_KILL = 12 ,
EXIT_ABRUPT = 14 , EXIT_ABRUPT = 14 ,
EXIT_NTSERVICE_ERROR = 20 , EXIT_NTSERVICE_ERROR = 20 ,
EXIT_JAVA = 21 , EXIT_JAVA = 21 ,
EXIT_OOM_MALLOC = 42 , EXIT_OOM_MALLOC = 42 ,
EXIT_OOM_REALLOC = 43 , EXIT_OOM_REALLOC = 43 ,
EXIT_FS = 45 , EXIT_FS = 45 ,
EXIT_CLOCK_SKEW = 47 , EXIT_CLOCK_SKEW = 47 ,
EXIT_NET_ERROR = 48 , EXIT_NET_ERROR = 48 ,
EXIT_WINDOWS_SERVICE_STOP = 49 ,
EXIT_POSSIBLE_CORRUPTION = 60 , // this means we detected a possibl e corruption situation, like a buf overflow EXIT_POSSIBLE_CORRUPTION = 60 , // this means we detected a possibl e corruption situation, like a buf overflow
EXIT_UNCAUGHT = 100 , // top level exception that wasn't caught EXIT_UNCAUGHT = 100 , // top level exception that wasn't caught
EXIT_TEST = 101 , EXIT_TEST = 101 ,
}; };
void dbexit( ExitCode returnCode, const char *whyMsg = "", bool tryToGe tLock = false); void dbexit( ExitCode returnCode, const char *whyMsg = "", bool tryToGe tLock = false);
/** /**
this is here so you can't just type exit() to quit the program this is here so you can't just type exit() to quit the program
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 queryoptimizer.h   queryoptimizer.h 
skipping to change at line 482 skipping to change at line 482
/** Provides a cursor interface for certain limited uses of a MultiPlan Scanner. */ /** Provides a cursor interface for certain limited uses of a MultiPlan Scanner. */
class MultiCursor : public Cursor { class MultiCursor : public Cursor {
public: public:
class CursorOp : public QueryOp { class CursorOp : public QueryOp {
public: public:
CursorOp() {} CursorOp() {}
CursorOp( const QueryOp &other ) : QueryOp( other ) {} CursorOp( const QueryOp &other ) : QueryOp( other ) {}
virtual shared_ptr<Cursor> newCursor() const = 0; virtual shared_ptr<Cursor> newCursor() const = 0;
}; };
/** takes ownership of 'op' */ /** takes ownership of 'op' */
MultiCursor( const char *ns, const BSONObj &pattern, const BSONObj &order, shared_ptr<CursorOp> op = shared_ptr<CursorOp>(), bool mayYield = f alse ); MultiCursor( const char *ns, const BSONObj &pattern, const BSONObj &order, shared_ptr<CursorOp> op = shared_ptr<CursorOp>(), bool mayYield = f alse, bool hintIdElseNatural = false );
/** /**
* Used * Used
* 1. To handoff a query to a getMore() * 1. To handoff a query to a getMore()
* 2. To handoff a QueryOptimizerCursor * 2. To handoff a QueryOptimizerCursor
* @param nscanned is an optional initial value, if not supplied ns canned() * @param nscanned is an optional initial value, if not supplied ns canned()
* will always return -1 * will always return -1
*/ */
MultiCursor( auto_ptr<MultiPlanScanner> mps, const shared_ptr<Curso r> &c, const shared_ptr<CoveredIndexMatcher> &matcher, const QueryOp &op, l ong long nscanned = -1 ); MultiCursor( auto_ptr<MultiPlanScanner> mps, const shared_ptr<Curso r> &c, const shared_ptr<CoveredIndexMatcher> &matcher, const QueryOp &op, l ong long nscanned = -1 );
virtual bool ok() { return _c->ok(); } virtual bool ok() { return _c->ok(); }
skipping to change at line 542 skipping to change at line 542
NoOp() {} NoOp() {}
NoOp( const QueryOp &other ) : CursorOp( other ) {} NoOp( const QueryOp &other ) : CursorOp( other ) {}
virtual void _init() { setComplete(); } virtual void _init() { setComplete(); }
virtual void next() {} virtual void next() {}
virtual bool mayRecordPlan() const { return false; } virtual bool mayRecordPlan() const { return false; }
virtual QueryOp *_createChild() const { return new NoOp(); } virtual QueryOp *_createChild() const { return new NoOp(); }
virtual shared_ptr<Cursor> newCursor() const { return qp().newC ursor(); } virtual shared_ptr<Cursor> newCursor() const { return qp().newC ursor(); }
virtual long long nscanned() { assert( false ); return 0; } virtual long long nscanned() { assert( false ); return 0; }
}; };
void nextClause(); void nextClause();
static BSONObj idElseNaturalHint( const char *ns );
shared_ptr<CursorOp> _op; shared_ptr<CursorOp> _op;
shared_ptr<Cursor> _c; shared_ptr<Cursor> _c;
BSONObj _hint;
BSONElement _hintElt;
auto_ptr<MultiPlanScanner> _mps; auto_ptr<MultiPlanScanner> _mps;
shared_ptr<CoveredIndexMatcher> _matcher; shared_ptr<CoveredIndexMatcher> _matcher;
long long _nscanned; long long _nscanned;
}; };
/** NOTE min, max, and keyPattern will be updated to be consistent with the selected index. */ /** NOTE min, max, and keyPattern will be updated to be consistent with the selected index. */
IndexDetails *indexDetailsForRange( const char *ns, string &errmsg, BSO NObj &min, BSONObj &max, BSONObj &keyPattern ); IndexDetails *indexDetailsForRange( const char *ns, string &errmsg, BSO NObj &min, BSONObj &max, BSONObj &keyPattern );
bool isSimpleIdQuery( const BSONObj& query ); bool isSimpleIdQuery( const BSONObj& query );
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added


 update.h   update.h 
skipping to change at line 52 skipping to change at line 52
} }
}; };
class RemoveSaver; class RemoveSaver;
/* returns true if an existing object was updated, false if no existing object was found. /* returns true if an existing object was updated, false if no existing object was found.
multi - update multiple objects - mostly useful with things like $se t multi - update multiple objects - mostly useful with things like $se t
god - allow access to system namespaces god - allow access to system namespaces
*/ */
UpdateResult updateObjects(const char *ns, const BSONObj& updateobj, BS ONObj pattern, bool upsert, bool multi , bool logop , OpDebug& debug ); UpdateResult updateObjects(const char *ns, const BSONObj& updateobj, BS ONObj pattern, bool upsert, bool multi , bool logop , OpDebug& debug, bool hintIdElseNatural = false );
UpdateResult _updateObjects(bool god, const char *ns, const BSONObj& up dateobj, BSONObj pattern, UpdateResult _updateObjects(bool god, const char *ns, const BSONObj& up dateobj, BSONObj pattern,
bool upsert, bool multi , bool logop , OpDe bool upsert, bool multi , bool logop , OpDe
bug& debug , RemoveSaver * rs = 0 ); bug& debug , RemoveSaver * rs = 0,
bool hintIdElseNatural = false);
// ---------- private ------------- // ---------- private -------------
class ModState; class ModState;
class ModSetState; class ModSetState;
/* Used for modifiers such as $inc, $set, $push, ... /* Used for modifiers such as $inc, $set, $push, ...
* stores the info about a single operation * stores the info about a single operation
* once created should never be modified * once created should never be modified
*/ */
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/