Skip to content

Conversation

agolubev
Copy link
Contributor

Ref #20448

Actually, can not see good way of simplifying WebSocket because of this change. Any thoughts?

@akka-ci
Copy link

akka-ci commented Aug 26, 2016

Can one of the repo owners verify this patch?

@johanandren
Copy link
Contributor

OK TO TEST

@johanandren
Copy link
Contributor

Yeah, I don't see how it can "simplify protocol a lot" either.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels Aug 29, 2016
@akka-ci
Copy link

akka-ci commented Aug 29, 2016

Test PASSed.

@ktoso
Copy link
Contributor

ktoso commented Aug 29, 2016

Actually, can not see good way of simplifying WebSocket because of this change. Any thoughts?

I think that's a very old comment that remained here (from before we had any split* operations.
Should have been removed in the past already IMO.

@ktoso
Copy link
Contributor

ktoso commented Aug 31, 2016

LGTM, thanks

@agolubev
Copy link
Contributor Author

Cool, need one more LGTM

}

override def onDownstreamFinish(): Unit = {
// If the substream is already cancelled or it has not been handed out, we can go away
if (!substreamWaitingToBePushed || substreamCancelled) completeStage()
if (substreamSource == null || substreamWaitingToBePushed || substreamCancelled) completeStage()
Copy link
Contributor

Choose a reason for hiding this comment

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

eq to be consistent with the other null comparison?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll fix this

@johanandren
Copy link
Contributor

Started looking at it but need to spend more time on it to understand the stage, will try to do that soon.

@ktoso ktoso added the t:http label Sep 13, 2016
Copy link
Contributor

@drewhk drewhk left a comment

Choose a reason for hiding this comment

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

Looks correct, but I don't see why the condition had to be reversed on L432

if (substreamSource eq null) {
//can be already pulled from substream in case split after
if (!hasBeenPulled(in)) pull(in)
} else if (substreamWaitingToBePushed) pushSubstreamSource()
Copy link
Contributor

Choose a reason for hiding this comment

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

this condition has been reversed (it was negated before). What is the reason?

Copy link
Contributor Author

@agolubev agolubev Dec 11, 2016

Choose a reason for hiding this comment

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

@drewhk the name of the variable should be "substreamWasPushed" in legacy code because of following:

if (!substreamWaitingToBePushed) {
 push(out, Source.fromGraph(substreamSource.source))
...
 substreamWaitingToBePushed = true
}

There are three stages - substreamSource is null because data not yet come from upstream.
When data came it can be pushed downstream or not yet pushed so substreamWaitingToBePushed should be true in this state but it's false. And the third stage when substream is pushed.
So I reversed substreamWaitingToBePushed value across split stage
My assumption is that substreamWaitingToBePushed was copied from groupBy stage with some misconception.
Let me know if I missed something.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I see thank you for the explanation.

@agolubev
Copy link
Contributor Author

To sum up - @drewhk has some concern about using reversing substreamWaitingToBePushed (as it seems name was not corresponding to flag purpose). Rest seems to be small nitpicks.
Let me know there is no major issue spotted.

@agolubev
Copy link
Contributor Author

Let me know if it's ok to rebase

@drewhk
Copy link
Contributor

drewhk commented Dec 13, 2016

only needs a rebase now.

@agolubev agolubev force-pushed the 20448-splitAfter-lazy-emit-substream-agolubev branch from 489dbd4 to 98f5e52 Compare December 14, 2016 03:39
@agolubev
Copy link
Contributor Author

PR is rebased and ready for merge.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels Dec 14, 2016
@akka-ci
Copy link

akka-ci commented Dec 14, 2016

Test PASSed.

@ktoso
Copy link
Contributor

ktoso commented Dec 14, 2016

LGTM AFAICS, Thanks @agolubev !

@ktoso ktoso merged commit 4207682 into akka:master Dec 14, 2016
marcpiechura added a commit to marcpiechura/akka.net that referenced this pull request Jan 1, 2018
marcpiechura added a commit to marcpiechura/akka.net that referenced this pull request Jan 1, 2018
Aaronontheweb pushed a commit to akkadotnet/akka.net that referenced this pull request Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:http tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants