Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Dec 12, 2014

Fix #1958

@zsxwing
Copy link
Member Author

zsxwing commented Dec 12, 2014

Find two more bugs:

  • GroupBy may not call unsubscribe
  • NPE if the key is null in GroupBy
    The unit tests demonstrates them.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 12, 2014

Fixed them in this PR.

@zsxwing zsxwing changed the title Fix the issue that Sample doesn't call 'unsubscribe' Fix the issue that GroupBy and Sample doesn't call 'unsubscribe' and also NPE when the key is null in GroupBy Dec 12, 2014
@zsxwing zsxwing changed the title Fix the issue that GroupBy and Sample doesn't call 'unsubscribe' and also NPE when the key is null in GroupBy Fix issues that GroupBy and Sample doesn't call 'unsubscribe' and also NPE when the key is null in GroupBy Dec 12, 2014
Copy link
Member

Choose a reason for hiding this comment

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

There is a self member variable which also points to this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point.

Copy link
Member

Choose a reason for hiding this comment

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

This will unsubscribe the downstream. I suggest instead having child.add(sampler); after L52.

Copy link
Member

Choose a reason for hiding this comment

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

I haven't had a chance to try this code yet, but I want to make sure this doesn't break the backpressure functionality where this operator requests Long.MAX_VALUE up.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will unsubscribe the downstream. I suggest instead having child.add(sampler); after L52.

Could you elaborate? I think unsubscribe the downstream would be OK for this operator.

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't had a chance to try this code yet, but I want to make sure this doesn't break the backpressure functionality where this operator requests Long.MAX_VALUE up.

sample with time does not support backpressure as it uses time to control data flow, right?

Copy link
Member

Choose a reason for hiding this comment

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

I feel some redundancy here. Maybe it is worth reviewing the other counters and state indicators.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 12, 2014

This PR contains a lot. I will split it to 3 PRs.

@zsxwing zsxwing closed this Dec 12, 2014
@zsxwing
Copy link
Member Author

zsxwing commented Dec 12, 2014

Split to #1965 #1966 #1967

@zsxwing zsxwing deleted the sample-unsubscribe branch December 15, 2014 07:00
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.

3 participants