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

OioSctpChannel read iterating over selected keys #3884

Closed
Scottmitch opened this issue Jun 12, 2015 · 5 comments
Closed

OioSctpChannel read iterating over selected keys #3884

Scottmitch opened this issue Jun 12, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@Scottmitch
Copy link
Member

I'm curious why the OioSctpChannel is iterating over readSelector.selectedKeys() but not using the SelectionKey. It seems like the assumption is the number of keys that are active is an indication of how many read operation should be done?

@Scottmitch
Copy link
Member Author

@benevans @trustin - Any thoughts?

@trustin
Copy link
Member

trustin commented Jul 7, 2015

/cc @jestan

@Scottmitch Scottmitch self-assigned this Aug 4, 2015
@Scottmitch
Copy link
Member Author

@jestan - Any objections to me removing this code?

@trustin
Copy link
Member

trustin commented Aug 21, 2015

@Scottmitch Please go ahead. We can't wait forever.

@Scottmitch
Copy link
Member Author

@trustin - Will do :)

@Scottmitch Scottmitch added this to the 4.0.31.Final milestone Aug 21, 2015
Scottmitch added a commit to Scottmitch/netty that referenced this issue Aug 26, 2015
Motivation:
OioSctpChannel.doReadMessages is iterating over the selected keys, and ignoring each selected key. It is not known why this is needed and no other channel implementation does this.

Modifications:
- Stop iterating over selected keys, and just read like other channels

Result:
No unnecessary iteration in OioSctpChannel.doReadMessages.
Fixes netty#3884
Scottmitch added a commit that referenced this issue Aug 27, 2015
Motivation:
OioSctpChannel.doReadMessages is iterating over the selected keys, and ignoring each selected key. It is not known why this is needed and no other channel implementation does this.

Modifications:
- Stop iterating over selected keys, and just read like other channels

Result:
No unnecessary iteration in OioSctpChannel.doReadMessages.
Fixes #3884
Scottmitch added a commit that referenced this issue Aug 27, 2015
Motivation:
OioSctpChannel.doReadMessages is iterating over the selected keys, and ignoring each selected key. It is not known why this is needed and no other channel implementation does this.

Modifications:
- Stop iterating over selected keys, and just read like other channels

Result:
No unnecessary iteration in OioSctpChannel.doReadMessages.
Fixes #3884
Apache9 added a commit to Apache9/netty that referenced this issue Dec 21, 2015
Motivation:
The fix for netty#3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:
Clear readSelector.selectedKeys() if it is not empty.

Result:
SctpEchoTest is green again.
normanmaurer pushed a commit that referenced this issue Dec 21, 2015
Motivation:
The fix for #3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:
Clear readSelector.selectedKeys() if it is not empty.

Result:
SctpEchoTest is green again.
normanmaurer pushed a commit that referenced this issue Dec 21, 2015
Motivation:
The fix for #3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:
Clear readSelector.selectedKeys() if it is not empty.

Result:
SctpEchoTest is green again.
pulllock pushed a commit to pulllock/netty that referenced this issue Oct 19, 2023
Motivation:
OioSctpChannel.doReadMessages is iterating over the selected keys, and ignoring each selected key. It is not known why this is needed and no other channel implementation does this.

Modifications:
- Stop iterating over selected keys, and just read like other channels

Result:
No unnecessary iteration in OioSctpChannel.doReadMessages.
Fixes netty#3884
pulllock pushed a commit to pulllock/netty that referenced this issue Oct 19, 2023
Motivation:
The fix for netty#3884 breaks SctpEchoTest because Selector.select will always return 0 if you do not clear last selectedKeys.

Modifications:
Clear readSelector.selectedKeys() if it is not empty.

Result:
SctpEchoTest is green again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants