Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SERVER-38466 Repeated reads concurrency workloads should reset previo…
…us documents before retrying transactions
  • Loading branch information
jsmulrow committed Dec 10, 2018
1 parent 6f23d1a commit 9eb7928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -19,9 +19,9 @@ var $config = extendWorkload($config, function($config, $super) {
// collection in order to stress the behavior of reading from the same snapshot over the
// course of multiple network roundtrips.
const batchSize = Math.max(2, Math.floor(this.numDocs / 5));
let prevDocuments;
const collection = this.session.getDatabase(db.getName()).getCollection(collName);
withTxnAndAutoRetry(this.session, () => {
let prevDocuments = undefined;
for (let i = 0; i < this.numReads; i++) {
const collectionDocs = collection.find().batchSize(batchSize).toArray();
assertWhenOwnColl.eq(
Expand Down
Expand Up @@ -14,9 +14,9 @@ var $config = extendWorkload($config, function($config, $super) {
$config.data.numReads = 5;

$config.states.repeatedRead = function repeatedRead(db, collName) {
let prevDocuments;
const collection = this.session.getDatabase(db.getName()).getCollection(collName);
withTxnAndAutoRetry(this.session, () => {
let prevDocuments = undefined;
for (let i = 0; i < this.numReads; i++) {
const collectionDocs = collection.find().toArray();
assertWhenOwnColl.eq(
Expand Down

0 comments on commit 9eb7928

Please sign in to comment.