Skip to content

Conversation

stormslowly
Copy link

i am use mongoose 3.8.23 (a old version) the related mongodb native is "1.4.28".
we have 10host replset mongodb, whatever strategy we use the load is extremely un-balance.

after we dig in, we find the sort compare function return a boolean not a number so it will result in unsorted after call sort

e.g

b= [1,2,10,3,78,8,90,11,3,20,7,4,2]
b.sort(function(x,y){return x>y})
// b = [ 90,1,11,2,2,3,3,4,7,8,10,20,78]

after fix that the load is balanced to DBs.

But i can not found the 1.x.x related branch, and there is no strategies in 2.x.x
so i do PR in this branch.

if there are some proper place to do the PR just let me know.

@christkv
Copy link
Contributor

christkv commented Jan 8, 2016

you want to merge against the master branch.

@stormslowly
Copy link
Author

@christkv Thanks you will do it on master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants