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

Implement variant of windowTimeout with fairBackpressure #3054

Merged
merged 42 commits into from
Jun 10, 2022

Conversation

OlegDokuka
Copy link
Contributor

No description provided.

OlegDokuka and others added 30 commits February 1, 2022 01:02
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
@OlegDokuka OlegDokuka requested a review from a team as a code owner May 26, 2022 05:45
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Copy link
Member

@simonbasle simonbasle left a comment

Choose a reason for hiding this comment

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

nice and huge work ! my main concern is around discarding of window queued elements rather than the window itself.

@@ -177,7 +179,12 @@ public static void race(int timeoutSeconds, Scheduler s, final Runnable... rs) {

try {
if (!cdl.await(timeoutSeconds, TimeUnit.SECONDS)) {
throw new AssertionError("RaceTestUtils.race wait timed out after " + timeoutSeconds + "s");
throw new AssertionError("RaceTestUtils.race wait timed out after " + timeoutSeconds + "s" + Thread.getAllStackTraces()
Copy link
Member

Choose a reason for hiding this comment

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

this looks potentially very verbose for the general case? maybe add an overload that does the allStackTraces appending?

Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest adding an overload with a boolean collectAllStackTraces parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

import reactor.util.context.Context;

/**
* @author David Karnok
Copy link
Member

Choose a reason for hiding this comment

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

I think you can add yourself here too @OlegDokuka 😆

int received = this.received + 1 ;
this.received = received;

this.queue.offer(t);
Copy link
Member

Choose a reason for hiding this comment

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

should we guard against an already cancelled window here and directly discard each element before they get a chance to be added to the queue?

@simonbasle simonbasle added this to the 3.4.19 milestone Jun 10, 2022
@simonbasle simonbasle added type/bug A general bug type/enhancement A general enhancement labels Jun 10, 2022
@simonbasle
Copy link
Member

relates to (fixes?): #1099, #1898 and #2920

Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
@simonbasle simonbasle changed the title implements new version of WindowTimeout (2nd edition) Implement variant of windowTimeout with fairBackpressure Jun 10, 2022
@simonbasle simonbasle merged commit f119b13 into 3.4.x Jun 10, 2022
@reactorbot
Copy link

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

@simonbasle simonbasle deleted the enhancement/window-timeout-new-v2 branch June 10, 2022 21:18
simonbasle added a commit that referenced this pull request Jun 10, 2022
simonbasle pushed a commit that referenced this pull request Jun 15, 2022
This commit improves the  InnerWindow.sendNext method to guard against
attempts at sending more than the window's maxSize elements, earlier in
the codepath.

It also removes an unused method that was left-in during iterations on
the backpressure-aware new implementation from #3054.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants