[SERVER-15064] Extend benchRun store and retrieve values Created: 27/Aug/14  Updated: 21/Oct/14  Resolved: 20/Sep/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.7.1
Fix Version/s: 2.7.7

Type: New Feature Priority: Critical - P2
Reporter: Alvin Richards (Inactive) Assignee: Alvin Richards (Inactive)
Resolution: Done Votes: 0
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Participants:

 Description   

Problem:
A test case can be defined thus

tests.push( { name: "Remove.IntId",
              pre: function( collection ) {
                  collection.drop();
                  for ( var i = 0; i < 1000; i++ ) {
                      collection.insert( { _id : i } );
                  }
              },
              ops: [
                  { op:  "insert",
                    doc: { _id : { "#RAND_INT" : [ 0, 1000 ] } } },                  
                  { op:  "remove",            
                    query: { _id : { "#RAND_INT" : [ 0, 1000 ] } } }
              ] } );

There are issues with this
1) A different random number is generated between the "insert" and "remove" steps - thus no guarantee that each step is operating on the same value.

2) As threads are added, there is the potential that data is removed by another thread before the second step executes, or the first step fails because another thread has just inserted that value.



 Comments   
Comment by Githook User [ 20/Sep/14 ]

Author:

{u'username': u'alvinr', u'name': u'Alvin Richards', u'email': u'alvin@10gen.com'}

Message: SERVER-15064 Extend benchRun store and retrieve values

Closes #785

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/881b3a97fb5080b4e5d5ce11ad016da73ea23931

Comment by Alvin Richards (Inactive) [ 18/Sep/14 ]

greg_10gen, dan@10gen.com suggested getting you to do this code review, Andy is a bit tied up.

Comment by Alvin Richards (Inactive) [ 11/Sep/14 ]

been reviewed by the team, over to you for code review!

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