Skip to content

Removing CustomThreadedSelectorServer.java#6454

Open
Amemeda wants to merge 1 commit into
apache:mainfrom
Amemeda:cleanup
Open

Removing CustomThreadedSelectorServer.java#6454
Amemeda wants to merge 1 commit into
apache:mainfrom
Amemeda:cleanup

Conversation

@Amemeda

@Amemeda Amemeda commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Investigated relevance of CustomThreadedSelectorServer.java

  • This file overrides getRunnable method from TThreadedSelectorServer.java.
  • CustomThreadedSelectorServer.java had only 1 usage in TServerUtils.java: return new ServerAddress(new CustomThreadedSelectorServer(options), address);

Result:

  • Deleted file CustomThreadedSelectorServer.java
  • replaced its 1 usage with TThreadedSelectorServer.java

@Amemeda Amemeda marked this pull request as ready for review June 30, 2026 16:03
@Amemeda

Amemeda commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@ctubbsii

@DomGarguilo DomGarguilo added this to the 4.0.0 milestone Jun 30, 2026
@DomGarguilo DomGarguilo requested a review from ctubbsii June 30, 2026 21:04
Comment on lines -63 to -64
TServerUtils.clientAddress
.set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe all of this custom stuff is just to extract this client address from the socket, so we can use it elsewhere (probably for logging). I don't think we can delete this without replacing it with a different mechanism to get the client address.

The field we are using reflection to read used to be accessible in previous versions of Thrift, and then it was made private, which caused us to make this class to work around that. We may still need this workaround, unless Thrift provided another means to obtain the client address from the connection.

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