Skip to content
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

fix random CheckReplOplog failures in 'passthough' test suites #107

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

igorsol
Copy link
Contributor

@igorsol igorsol commented Oct 5, 2017

This is a fix for the issue #108

@@ -1066,7 +1066,7 @@ namespace mongo {
_currentSequenceNumber =
RocksRecoveryUnit::getRocksRecoveryUnit(opCtx)->snapshot()->GetSequenceNumber();

if (!startIterator.isNull()) {
if (!startIterator.isNull() && !_readUntilForOplog.isNull()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

startIterator is not-null only in the oplog case. _readUntilForOplog is not-null in oplog case and when this is a forward iterator.

So what this fix does is make sure we only use the startIterator optimization in forward cursors, and not in backward cursor. Is that what you are trying to do? That seems like a good thing to do, although I don't fully understand the test failures mentioned in #107 to say with confidence that this fix will solve the problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intention was to leave this hack for both forward and backward cursors but to remove it for non-oplog capped collections. Frankly speaking, I don't know how this fixes CheckReplOplog - this was just a guess.
After quick code analysis i think _readUntilForOplog can be not-null for backward cursors too. Are you sure it cannot?

Copy link
Contributor

Choose a reason for hiding this comment

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

non-oplog capped collections will definitely have startIterator as null, right? See here: https://github.com/mongodb-partners/mongo-rocks/blob/master/src/rocks_record_store.cpp#L772

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.

None yet

2 participants