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

chore: Map Stream to Support Concurrent Requests #160

Merged
merged 7 commits into from
Feb 11, 2025
Merged

chore: Map Stream to Support Concurrent Requests #160

merged 7 commits into from
Feb 11, 2025

Conversation

yhl25
Copy link
Contributor

@yhl25 yhl25 commented Dec 20, 2024

No description provided.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 68.14159% with 36 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@1921c4e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...numaflow/mapstreamer/MapStreamSupervisorActor.java 50.00% 32 Missing and 2 partials ⚠️
...o/numaproj/numaflow/mapper/MapSupervisorActor.java 0.00% 1 Missing ⚠️
...java/io/numaproj/numaflow/mapstreamer/Service.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #160   +/-   ##
=======================================
  Coverage        ?   57.90%           
  Complexity      ?      390           
=======================================
  Files           ?      129           
  Lines           ?     2910           
  Branches        ?      181           
=======================================
  Hits            ?     1685           
  Misses          ?     1108           
  Partials        ?      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yhl25 yhl25 marked this pull request as ready for review February 6, 2025 06:03

private void handleFailure(Exception e) {
getContext().getSystem().log().error("Encountered error in mapStreamFn", e);
if (userException == null) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: && e != null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

handleFailure will only be invoked when there is an exception in the code.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but I don't think we shouldn't assume caller behaviour when we implement a method.

String[] keys = mapRequest.getRequest().getKeysList().toArray(new String[0]);

try {
OutputObserverImpl outputObserver = new OutputObserverImpl(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
OutputObserverImpl outputObserver = new OutputObserverImpl(
OutputObserver outputObserver = new OutputObserverImpl(

We can move sendEOF() to MapStreamerActor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MapStreamerActor won't have that context, I prefer to do it here because the processMessage is a blocking call and immediately after the processing is done we are sending EOF. I don't anything wrong here.

Copy link
Member

Choose a reason for hiding this comment

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

won't have that context.

Do you mean requestId and supervisor actor ref? if so, I think MapStreamerActor has the context of both.

I was proposing that ObserverImpl only implements methods the interface defines but I am also ok with having an extra sendEOF.

Signed-off-by: Yashash H L <[email protected]>
@yhl25 yhl25 requested a review from KeranYang February 11, 2025 01:35
Copy link
Member

@KeranYang KeranYang left a comment

Choose a reason for hiding this comment

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

LGTM!

@yhl25 yhl25 merged commit 097467c into main Feb 11, 2025
5 checks passed
@yhl25 yhl25 deleted the map-stream branch February 11, 2025 16:24
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