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

Fixed simultaneus reads on same ledger/entry with v2 protocol #720

Closed
wants to merge 5 commits into from

Conversation

merlimat
Copy link
Contributor

This change is coming from yahoo branch at YahooArchive/bookkeeper@ce7b0f7

With v2 protocol there's no way to disambiguate the read request since the completion key is made from (ledgerId, entryId).
This PR introduced an additional multimap to handle the conflicts (multiple simultaneus read requests for the same entry).

@merlimat merlimat added this to the 4.7.0 milestone Nov 11, 2017
@merlimat merlimat self-assigned this Nov 11, 2017
@asfgit
Copy link

asfgit commented Nov 11, 2017

FAILURE

--none--

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

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

+1 #shipit

*
* @throws Exception
*/
@Test(timeout = 20000)
Copy link
Member

Choose a reason for hiding this comment

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

Remove timemout?
I recall there was a require to remove all the "timeout", since we have a global timeout set in surefire configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will update

*
* @throws Exception
*/
@Test(timeout = 20000)
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

@jiazhai jiazhai left a comment

Choose a reason for hiding this comment

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

+1, LGTM, only minor comments.

@@ -845,6 +846,56 @@ private void writeAndFlush(final Channel channel,
errorOut(key);
}
}

void errorOutReadKey(final CompletionKey key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This code isn't valid anymore. Erroring out is now part of the completionValue, so this should be handled there.

}
}

final Channel c = channel;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is handled in writeAndFlush now. You'll need to add a check for the conflicts map into the #errorOut method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I've missed that part. I'll fix that

@sijie
Copy link
Member

sijie commented Dec 4, 2017

@merlimat @ivankelly : any updates on this PR? I was lost who is picking up pr.

@ivankelly
Copy link
Contributor

ivankelly commented Dec 4, 2017 via email

@merlimat
Copy link
Contributor Author

merlimat commented Dec 4, 2017

Rebased and applied fixes from @ivankelly

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants