[SERVER-5722] Support a 'sort' field in ops array for JS Benchmarking Harness Created: 30/Apr/12  Updated: 18/Mar/21  Resolved: 09/Mar/21

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.5, 4.0.24, 3.6.24, 4.2.14

Type: New Feature Priority: Trivial - P5
Reporter: A. Jesse Jiryu Davis Assignee: Ian Boros
Resolution: Done Votes: 2
Labels: benchRun, neweng, tig-benchrun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-7715 Add sort to benchRun query Closed
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2, v4.0, v3.6
Sprint: Query Execution 2021-03-22
Participants:

 Description   

benchRun supports limit, skip, and batchSize, but not sort:

http://www.mongodb.org/display/DOCS/JS+Benchmarking+Harness

https://github.com/mongodb/mongo/blob/master/src/mongo/scripting/bench.cpp#L455



 Comments   
Comment by Githook User [ 10/Mar/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-5722 Support 'sort' in benchrun
Branch: v4.0
https://github.com/mongodb/mongo/commit/d5487c0c029def84aae860dd1db6a9f2316ea5e0

Comment by Githook User [ 10/Mar/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-5722 Support 'sort' in benchrun
Branch: v3.6
https://github.com/mongodb/mongo/commit/814b4e99722f87af7e6e7d9b15f68444b00f9f8d

Comment by Githook User [ 10/Mar/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-5722 Support 'sort' in benchrun
Branch: v4.2
https://github.com/mongodb/mongo/commit/9814566fc8f7a4c8e7abfc2358b712c10857b678

Comment by Githook User [ 10/Mar/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-5722 Support 'sort' in benchrun
Branch: v4.4
https://github.com/mongodb/mongo/commit/0768e172ae7883cc0f131a0fba048c884b0a6efc

Comment by Ian Boros [ 09/Mar/21 ]

david.daly The changes to mongo-perf that I intend to make rely on supporting this 'sort' field. So I believe we'll have to backport this all the way. I've looked into this, and it seems like applying my change will be pretty straightforward (though not just a git cherry-pick).

Comment by Githook User [ 08/Mar/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'puppyofkosh'}

Message: SERVER-5722 Support 'sort' in benchrun
Branch: master
https://github.com/mongodb/mongo/commit/e38f1e4c5b4153d6c547234d05a612ae30edc080

Comment by David Daly [ 02/Oct/17 ]

Updating the link I put before to tie it to a commit. I said it would fit here.

Comment by David Storch [ 18/Nov/16 ]

david.daly, yep, that sounds right to me.

Comment by David Daly [ 18/Nov/16 ]

david.storch kyle.suarez Would the addition fit here (that's FindOne. Also for find) for the readCmd path, and create something similar to our current work around for the non readCmd path?

Comment by Kyle Suarez [ 17/Nov/16 ]

Having this would be especially helpful for the views project. They require --readCmd true to work properly, so we cannot apply a views passthrough to existing query tests that rely on the $query example that Dan mentioned, since that's not supported in read commands.

Comment by David Storch [ 07/Oct/16 ]

Despite the workaround above for legacy OP_QUERY find, my reading of the shell's implementation of benchRun in the master branch suggests that neither a "sort" nor an "orderby" field is supported when find command is enabled via the readCmd option. It would be useful to support this option in a general way for both find command and legacy OP_QUERY, so I am re-opening this ticket for consideration by the performance infrastructure team.

Comment by Daniel Pasette (Inactive) [ 18/Jun/15 ]

You can add a sort by adding an orderBy clause into the query document.

{ op: "find",
         query: { $query: {x: { $gte : 0 }}, $orderby : {"x" : 1} }
}

Generated at Thu Feb 08 03:09:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.