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

BarrageSubscriptionImpl: fix race conditions in subscription logic #4630

Merged
merged 15 commits into from
Oct 17, 2023

Conversation

nbauernfeind
Copy link
Member

@nbauernfeind nbauernfeind commented Oct 12, 2023

@nbauernfeind nbauernfeind added bug Something isn't working core Core development tasks NoDocumentationNeeded barrage-wrkr2wrkr ReleaseNotesNeeded Release notes are needed labels Oct 12, 2023
@nbauernfeind nbauernfeind added this to the September 2023 milestone Oct 12, 2023
@nbauernfeind nbauernfeind self-assigned this Oct 12, 2023
Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

We need some further refactoring, which may simplify matters.

@@ -17,7 +17,7 @@ public class GrpcUtil {
private static final Logger log = LoggerFactory.getLogger(GrpcUtil.class);

public static StatusRuntimeException securelyWrapError(final Logger log, final Throwable err) {
return securelyWrapError(log, err, Code.INVALID_ARGUMENT);
return securelyWrapError(log, err, Code.ABORTED);
Copy link
Member

Choose a reason for hiding this comment

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

My reading of the documentation for ABORTED suggests that this is not the best change to make. It also seems like a deviation from our norms. Maybe @niloc132 can weigh in.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cristian, Colin, and I dug in a bit and agree that ABORTED is an acceptable alternative. Per our discussion, Ryan, it would be better to change this in isolation swapping the status type for other similar cases.

*
* @return number of rows received by the subscription handler
*/
long getRowsReceived();
Copy link
Member

Choose a reason for hiding this comment

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

Check if Devin, Andy, or Charles are using this. I expect not.

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
nbauernfeind and others added 2 commits October 17, 2023 13:31
@nbauernfeind nbauernfeind enabled auto-merge (squash) October 17, 2023 20:16
@nbauernfeind nbauernfeind merged commit cbaf19b into deephaven:main Oct 17, 2023
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
barrage-wrkr2wrkr bug Something isn't working core Core development tasks NoDocumentationNeeded ReleaseNotesNeeded Release notes are needed
Projects
None yet
2 participants