Skip to content

Conversation

addaleax
Copy link
Collaborator

@addaleax addaleax commented May 3, 2021

databases.sort((a: any, b: any): any => {
return a._id > b._id;
databases.sort((a: any, b: any): number => {
return a._id.localeCompare(b._id);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something I noticed, this would obviously not have worked before because the .sort() callback should not return a boolean.

{ $sort: { shard: 1 } })
).toArray();
{ $sort: { shard: 1 } }
])).toArray();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests really should have discovered that sh.status() was also broken, I just noticed this because I was looking for other uses of config.chunks in the shell-api source. I’ve opened https://jira.mongodb.org/browse/MONGOSH-742 as a reminder to write proper tests here.

Copy link
Contributor

@rose-m rose-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finds apart from the fixed 5.0 change itself :D

@addaleax addaleax merged commit cf7a965 into main May 3, 2021
@addaleax addaleax deleted the 740-dev branch May 3, 2021 13:35
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