Skip to content

GODRIVER-1363 fix indexes for writeErrors with batches and filter ret… #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2020

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Apr 9, 2020

…urned indexes

@iwysiu iwysiu requested review from jyemin and divjotarora April 9, 2020 14:42
@jyemin jyemin removed their request for review April 9, 2020 16:48
@iwysiu iwysiu requested a review from divjotarora April 16, 2020 14:50
}

// force multiple batches
numDocs := 700000
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add some newlines to split up this test. Something like

createDocsArray

InsertMany/check error

assert error type and check indexes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

numErrors := len(we.WriteErrors)
assert.Equal(mt, 1, numErrors, "expected 1 write error, got %v", numErrors)
gotIndex := we.WriteErrors[0].Index
assert.Equal(mt, numDocs+1, gotIndex, "expected index :%v, got %v", numDocs+1, gotIndex)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove the colon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@iwysiu iwysiu merged commit c814cfb into mongodb:master Apr 16, 2020
@iwysiu iwysiu deleted the GODRIVER-1363 branch April 16, 2020 18:29
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