Supports configuring TCP Keepalive related parameters in Bookie Client.#4683
Merged
zymap merged 2 commits intoapache:masterfrom Nov 24, 2025
Merged
Supports configuring TCP Keepalive related parameters in Bookie Client.#4683zymap merged 2 commits intoapache:masterfrom
zymap merged 2 commits intoapache:masterfrom
Conversation
Signed-off-by: xiaolongran <ranxiaolong716@gmail.com>
zymap
approved these changes
Nov 14, 2025
Signed-off-by: xiaolongran <ranxiaolong716@gmail.com>
liudezhi2098
approved these changes
Nov 15, 2025
Member
|
rerun failure checks |
3 similar comments
Member
Author
|
rerun failure checks |
Member
Author
|
rerun failure checks |
Member
Author
|
rerun failure checks |
lhotari
pushed a commit
that referenced
this pull request
Nov 28, 2025
…t. (#4683) ### Motivation In a private environment, network connectivity between data centers is limited by firewall configuration. When the Broker accesses Bookkeeper infrequently, exceeding the firewall's default deactivation time (20 minutes), the firewall will actively disconnect the Broker → Bookkeeper connection. At this point, if a new production or consumption request is made, the Broker cannot safely access the Bookkeeper node again, causing production/consumption failures that cannot be automatically recovered from. The error message primarily indicates connection-level anomalies: <img width="2944" height="738" alt="Clipboard_Screenshot_1763091013" src="https://github.com/user-attachments/assets/e58b53b9-1c79-49cd-a4d7-1040f52569e0" /> The current Broker → Bookkeeper access chain is based on the Netty communication framework, and the keepalive function at the TCP connection layer reuses the system default SO_KEEPALIVE. The code is `PerChannelBookieClient` → `connect()`, as follows: <img width="1982" height="434" alt="Clipboard_Screenshot_1763091110" src="https://github.com/user-attachments/assets/979716b6-d99a-4dfd-9829-cd724c597c20" /> If no policy is explicitly set, the "System Default" option in the table follow will be used directly: TCP_KEEPIDLE | 7200s -- | -- TCP_KEEPINTVL | 75s TCP_KEEPCNT | 9 ### Changes Include the following three configuration items in ClientConfiguration: ``` public static final String TCP_KEEPIDLE = "tcpKeepIdle"; public static final String TCP_KEEPINTVL = "tcpKeepIntvl"; public static final String TCP_KEEPCNT = "tcpKeepCnt"; ``` To maintain compatibility, the system default configuration will still be used by default. (cherry picked from commit ea7884a)
priyanshu-ctds
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Dec 2, 2025
…t. (apache#4683) ### Motivation In a private environment, network connectivity between data centers is limited by firewall configuration. When the Broker accesses Bookkeeper infrequently, exceeding the firewall's default deactivation time (20 minutes), the firewall will actively disconnect the Broker → Bookkeeper connection. At this point, if a new production or consumption request is made, the Broker cannot safely access the Bookkeeper node again, causing production/consumption failures that cannot be automatically recovered from. The error message primarily indicates connection-level anomalies: <img width="2944" height="738" alt="Clipboard_Screenshot_1763091013" src="https://github.com/user-attachments/assets/e58b53b9-1c79-49cd-a4d7-1040f52569e0" /> The current Broker → Bookkeeper access chain is based on the Netty communication framework, and the keepalive function at the TCP connection layer reuses the system default SO_KEEPALIVE. The code is `PerChannelBookieClient` → `connect()`, as follows: <img width="1982" height="434" alt="Clipboard_Screenshot_1763091110" src="https://github.com/user-attachments/assets/979716b6-d99a-4dfd-9829-cd724c597c20" /> If no policy is explicitly set, the "System Default" option in the table follow will be used directly: TCP_KEEPIDLE | 7200s -- | -- TCP_KEEPINTVL | 75s TCP_KEEPCNT | 9 ### Changes Include the following three configuration items in ClientConfiguration: ``` public static final String TCP_KEEPIDLE = "tcpKeepIdle"; public static final String TCP_KEEPINTVL = "tcpKeepIntvl"; public static final String TCP_KEEPCNT = "tcpKeepCnt"; ``` To maintain compatibility, the system default configuration will still be used by default. (cherry picked from commit ea7884a) (cherry picked from commit e199e8d)
srinath-ctds
pushed a commit
to datastax/bookkeeper
that referenced
this pull request
Dec 4, 2025
…t. (apache#4683) ### Motivation In a private environment, network connectivity between data centers is limited by firewall configuration. When the Broker accesses Bookkeeper infrequently, exceeding the firewall's default deactivation time (20 minutes), the firewall will actively disconnect the Broker → Bookkeeper connection. At this point, if a new production or consumption request is made, the Broker cannot safely access the Bookkeeper node again, causing production/consumption failures that cannot be automatically recovered from. The error message primarily indicates connection-level anomalies: <img width="2944" height="738" alt="Clipboard_Screenshot_1763091013" src="https://github.com/user-attachments/assets/e58b53b9-1c79-49cd-a4d7-1040f52569e0" /> The current Broker → Bookkeeper access chain is based on the Netty communication framework, and the keepalive function at the TCP connection layer reuses the system default SO_KEEPALIVE. The code is `PerChannelBookieClient` → `connect()`, as follows: <img width="1982" height="434" alt="Clipboard_Screenshot_1763091110" src="https://github.com/user-attachments/assets/979716b6-d99a-4dfd-9829-cd724c597c20" /> If no policy is explicitly set, the "System Default" option in the table follow will be used directly: TCP_KEEPIDLE | 7200s -- | -- TCP_KEEPINTVL | 75s TCP_KEEPCNT | 9 ### Changes Include the following three configuration items in ClientConfiguration: ``` public static final String TCP_KEEPIDLE = "tcpKeepIdle"; public static final String TCP_KEEPINTVL = "tcpKeepIntvl"; public static final String TCP_KEEPCNT = "tcpKeepCnt"; ``` To maintain compatibility, the system default configuration will still be used by default. (cherry picked from commit ea7884a) (cherry picked from commit e199e8d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
In a private environment, network connectivity between data centers is limited by firewall configuration. When the Broker accesses Bookkeeper infrequently, exceeding the firewall's default deactivation time (20 minutes), the firewall will actively disconnect the Broker → Bookkeeper connection.

At this point, if a new production or consumption request is made, the Broker cannot safely access the Bookkeeper node again, causing production/consumption failures that cannot be automatically recovered from. The error message primarily indicates connection-level anomalies:
The current Broker → Bookkeeper access chain is based on the Netty communication framework, and the keepalive function at the TCP connection layer reuses the system default SO_KEEPALIVE. The code is

PerChannelBookieClient→connect(), as follows:If no policy is explicitly set, the "System Default" option in the table follow will be used directly:
Changes
Include the following three configuration items in ClientConfiguration:
To maintain compatibility, the system default configuration will still be used by default.