Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conf/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,8 @@ bookkeeperClientNumWorkerThreads=
bookkeeperClientNumIoThreads=

# Use separated IO threads for BookKeeper client
# Default is false, which will use Pulsar IO threads
bookkeeperClientSeparatedIoThreadsEnabled=false
# Default is true, which will use dedicated BookKeeper IO threads
bookkeeperClientSeparatedIoThreadsEnabled=true

# Speculative reads are initiated if a read request doesn't complete within a certain time
# Using a value of 0, is disabling the speculative reads
Expand Down
4 changes: 2 additions & 2 deletions conf/standalone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ bookkeeperClientNumWorkerThreads=
bookkeeperClientNumIoThreads=

# Use separated IO threads for BookKeeper client
# Default is false, which will use Pulsar IO threads
bookkeeperClientSeparatedIoThreadsEnabled=false
# Default is true, which will use dedicated BookKeeper IO threads
bookkeeperClientSeparatedIoThreadsEnabled=true

# Speculative reads are initiated if a read request doesn't complete within a certain time
# Using a value of 0, is disabling the speculative reads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2201,9 +2201,10 @@ The max allowed delay for delayed delivery (in milliseconds). If the broker rece

@FieldContext(
category = CATEGORY_STORAGE_BK,
doc = "Use separated IO threads for BookKeeper client. Default is false, which will use Pulsar IO threads"
doc = "Use separated IO threads for BookKeeper client. Default is true, which will use dedicated "
+ "BookKeeper IO threads"
)
private boolean bookkeeperClientSeparatedIoThreadsEnabled = false;
private boolean bookkeeperClientSeparatedIoThreadsEnabled = true;

/**** --- Managed Ledger. --- ****/
@FieldContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ public void testBookKeeperIoThreadsConfiguration() throws Exception {
EventLoopGroup eventLoopGroup = mock(EventLoopGroup.class);
BookKeeper.Builder builder = factory.getBookKeeperBuilder(conf, eventLoopGroup,
mock(StatsLogger.class), mock(ClientConfiguration.class));
assertEquals(FieldUtils.readField(builder, "eventLoopGroup", true), eventLoopGroup);
conf.setBookkeeperClientSeparatedIoThreadsEnabled(true);
assertNull(FieldUtils.readField(builder, "eventLoopGroup", true));
conf.setBookkeeperClientSeparatedIoThreadsEnabled(false);
builder = factory.getBookKeeperBuilder(conf, eventLoopGroup,
mock(StatsLogger.class), mock(ClientConfiguration.class));
assertNull(FieldUtils.readField(builder, "eventLoopGroup", true));
assertEquals(FieldUtils.readField(builder, "eventLoopGroup", true), eventLoopGroup);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void testBookKeeperClientIoThreads() throws Exception {
try (FileInputStream stream = new FileInputStream("../conf/broker.conf")) {
final ServiceConfiguration fileConfig =
PulsarConfigurationLoader.create(stream, ServiceConfiguration.class);
assertFalse(fileConfig.isBookkeeperClientSeparatedIoThreadsEnabled());
assertTrue(fileConfig.isBookkeeperClientSeparatedIoThreadsEnabled());
assertEquals(fileConfig.getBookkeeperClientNumIoThreads(), Runtime.getRuntime().availableProcessors() * 2);
}
String confFile = "bookkeeperClientNumIoThreads=1\n"
Expand Down
Loading