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

Adding an option to enable/disable TCP_NODELAY socket option #1320

Merged
merged 1 commit into from
Dec 9, 2019

Conversation

dniq
Copy link

@dniq dniq commented Nov 21, 2019

This change adds a configuration property to enable or disable TCP_NODELAY socket option in BlockingChannel (used for replication only ATM) and adds an additional (optional) parameter for the same. If the parameter is not provided - a default 'true' (enabled) is assumed. This means that the tests (which have not been updated) will have TCP_NODELAY socket option set to 'true'.

@dniq dniq requested review from cgtz and jsjtzyy November 22, 2019 00:02
@codecov-io
Copy link

codecov-io commented Nov 22, 2019

Codecov Report

Merging #1320 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1320      +/-   ##
============================================
- Coverage     72.13%   72.11%   -0.03%     
- Complexity     6455     6456       +1     
============================================
  Files           469      469              
  Lines         37071    37081      +10     
  Branches       4660     4660              
============================================
- Hits          26743    26740       -3     
- Misses         9087     9103      +16     
+ Partials       1241     1238       -3
Impacted Files Coverage Δ Complexity Δ
...java/com.github.ambry.network/BlockingChannel.java 82.14% <100%> (+1.13%) 15 <2> (+2) ⬆️
.../com.github.ambry.network/BlockingChannelInfo.java 80.95% <100%> (ø) 16 <0> (ø) ⬇️
.../com.github.ambry/config/ConnectionPoolConfig.java 100% <100%> (ø) 1 <0> (ø) ⬇️
...a/com.github.ambry.network/SSLBlockingChannel.java 75.67% <100%> (+2.94%) 4 <3> (+2) ⬆️
...c/main/java/com.github.ambry.network/Selector.java 78.21% <0%> (-1.84%) 77% <0%> (-2%)
...m.github.ambry.replication/ReplicationMetrics.java 94.97% <0%> (-1.2%) 43% <0%> (-1%)
...va/com.github.ambry.replication/ReplicaThread.java 87.33% <0%> (-0.76%) 92% <0%> (-1%)
...in/java/com.github.ambry.store/BlobStoreStats.java 71.45% <0%> (-0.42%) 104% <0%> (-1%)
.../main/java/com.github.ambry.store/ScanResults.java 82.81% <0%> (ø) 17% <0%> (ø) ⬇️
...in/java/com.github.ambry.network/SocketServer.java 85.71% <0%> (+0.4%) 15% <0%> (ø) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55acc01...1c00cb7. Read the comment docs.

Copy link
Contributor

@jsjtzyy jsjtzyy left a comment

Choose a reason for hiding this comment

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

A few comments.

This change adds a configuration property to enable or disable TCP_NODELAY socket option in BlockingChannel (used for replication only ATM)
this(host, port, readBufferSize, writeBufferSize, readTimeoutMs, connectTimeoutMs, true);
}

public BlockingChannel(String host, int port, ConnectionPoolConfig config) {
Copy link
Contributor

Choose a reason for hiding this comment

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

optional: can be package-private (public can be removed)

@cgtz cgtz merged commit 5811577 into linkedin:master Dec 9, 2019
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.

4 participants