mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Merge branch 'master' of github.com:mongodb/mongo
This commit is contained in:
commit
29676e06d9
@ -1008,13 +1008,14 @@ namespace mongo {
|
||||
virtual bool isMember( const DBConnector * conn ) const;
|
||||
|
||||
virtual void checkResponse( const char *data, int nReturned ) { checkMaster()->checkResponse( data , nReturned ); }
|
||||
|
||||
virtual bool isFailed() const {
|
||||
return _currentMaster == 0 || _currentMaster->isFailed();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void sayPiggyBack( Message &toSend ) { checkMaster()->say( toSend ); }
|
||||
|
||||
bool isFailed() const {
|
||||
return _currentMaster == 0 || _currentMaster->isFailed();
|
||||
}
|
||||
};
|
||||
|
||||
/** pings server to check if it's up
|
||||
|
@ -172,11 +172,13 @@ namespace mongo {
|
||||
ChunkPtr Chunk::singleSplit( bool force ){
|
||||
vector<BSONObj> splitPoint;
|
||||
|
||||
// If splitting is not obligatory, we may return early if there are not enough data.
|
||||
// if splitting is not obligatory we may return early if there are not enough data
|
||||
// we cap the number of objects that would fall in the first half (before the split point)
|
||||
// the rationale is we'll find a split point without traversing all the data
|
||||
if ( ! force ) {
|
||||
vector<BSONObj> candidates;
|
||||
const int maxPoints = 2;
|
||||
const int maxObjs = 100000;
|
||||
const int maxObjs = 250000;
|
||||
pickSplitVector( candidates , getManager()->getCurrentDesiredChunkSize() , maxPoints , maxObjs );
|
||||
if ( candidates.size() <= 1 ) {
|
||||
// no split points means there isn't enough data to split on
|
||||
|
Loading…
Reference in New Issue
Block a user