Skip to content

JAVA-5505 minor refactoring #1488

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

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

katcharov
Copy link
Collaborator

JAVA-5505

Mostly-automated refactoring to remove IDE nags. I've left unused methods like getCurrentRegistrationCount in AsynchronousTlsChannelGroup.

@katcharov katcharov requested a review from vbabanin August 28, 2024 14:53
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

I am not sure it's wise to refactor tlschannel code, which at some point we may have to synchronize with the upstream again. Detecting which discrepancies are functional and must not be lost when we synchronize, and which were done for other reasons, may be more difficult if we change the tlschannel code without necessity.

@@ -159,7 +159,7 @@ static final class WriteOperation extends Operation {

private final Selector selector;

final ExecutorService executor;
private final ExecutorService executor;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@stIncMale I can roll back the finals. The reduced visibility refactor would ensure that (in the near future) the user-set executor is not shut down from outside this class. Up to you - is this worth the potential future merge conflict?

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 like something worth discussing the team on the catchup meeting, or asking Jeff/Ross here, as they are likely the only ones who have idea on our process of syncing the tlschannel code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Force rebased. Removed finals commit, kept visibility commit.

@katcharov katcharov requested a review from stIncMale August 29, 2024 16:53
@@ -702,7 +706,7 @@ public void shutdownNow() {
*
* @return whether the channel is terminated
*/
public boolean isTerminated() {
private boolean isTerminated() {
Copy link
Member

Choose a reason for hiding this comment

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

This change seems irrelevant to making sure that the rest of the tlschannel code can't terminate a user-supplied executor. If that's so, let's not do the change.

@katcharov katcharov requested a review from stIncMale August 29, 2024 20:26
@katcharov katcharov merged commit fc7084d into mongodb:master Aug 30, 2024
54 of 59 checks passed
@katcharov katcharov deleted the JAVA-5505-refactor branch August 30, 2024 15:29
@katcharov
Copy link
Collaborator Author

Test failures appear to be unrelated.

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