-
Notifications
You must be signed in to change notification settings - Fork 143
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
Make handoff to record-stream thread w/ ArrayBlockingQueue#offer not LinkedBlockingQueue#put #1547
Make handoff to record-stream thread w/ ArrayBlockingQueue#offer not LinkedBlockingQueue#put #1547
Conversation
Signed-off-by: tinker-michaelj <[email protected]>
…g user transaction Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…cessLogic change Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…isable CI for now Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
…edSubmitKey() Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…ueueCapacity=5000 Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…ndoffTest Signed-off-by: tinker-michaelj <[email protected]>
…into 01499-01498-ExpandPtaInitFields
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…eNonBlockingHandoff
Signed-off-by: tinker-michaelj <[email protected]>
…into 01500-M0150-CreateNonBlockingHandoff
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
…00-M0150-CreateNonBlockingHandoff
Codecov Report
@@ Coverage Diff @@
## master-plus-sdk-0.15.0 #1547 +/- ##
=========================================================
Coverage 91.53% 91.53%
- Complexity 5880 5892 +12
=========================================================
Files 462 463 +1
Lines 17014 17044 +30
Branches 1778 1780 +2
=========================================================
+ Hits 15574 15602 +28
Misses 986 986
- Partials 454 456 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provided a few places to improve in a different clean-up PR.
//setup: | ||
// setup: | ||
nonBlockingHandoff = mock(NonBlockingHandoff.class); | ||
given(nonBlockingHandoff.offer(any())).willReturn(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should test with returning false
a few times before returning true
.
@@ -59,6 +59,7 @@ | |||
import static org.hamcrest.collection.IsIterableContainingInOrder.contains; | |||
import static org.junit.jupiter.api.Assertions.assertFalse; | |||
import static org.junit.jupiter.api.Assertions.assertTrue; | |||
import static org.mockito.ArgumentMatchers.eq; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: added but not used
Sonar passed w/ no (actual) new code smells here.
Related issue(s):
Closes #1500
Summary of the change:
NonBlockingHandoff
that effectively puts anArrayBlockingQueue
between thehandleTransaction
thread and therecordStream
thread.handleTransaction
from blocking on theLinkedBlockingQueue#put
used by theRecordStreamManager
threads, which from profiling appears almost 200% slower thanArrayBlockingQueue#offer
.Note: This PR also adds a
memo
field to theTxnAccessor
to eliminate a curiously expensive call to the gRPCTransactionBody.getMemo()
method.