Skip to content

Commit

Permalink
Fixed LogSorter from changes due to incorrect merge (#5307)
Browse files Browse the repository at this point in the history
The merge of #5193 from 2.1 to main reverted some changes
in main to LogSorter causing RecoveryIT to fail.
  • Loading branch information
dlmarion authored Feb 5, 2025
1 parent 56b97fa commit ed56a8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public void run() {
try {
// Attempt to process all existing log sorting work and start a background
// thread to look for log sorting work in the future
logSorter.startWatchingForRecoveryLogs();
logSorter.startWatchingForRecoveryLogs(threadPoolSize);
} catch (Exception ex) {
LOG.error("Error starting LogSorter");
throw new RuntimeException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ public void run() {
try {
// Attempt to process all existing log sorting work and start a background
// thread to look for log sorting work in the future
logSorter.startWatchingForRecoveryLogs();
logSorter.startWatchingForRecoveryLogs(threadPoolSize);
} catch (Exception ex) {
log.error("Error starting LogSorter");
throw new RuntimeException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ public long sortLogsIfNeeded() throws KeeperException, InterruptedException {
* thread to look for log sorting work in the future that will be processed by the
* ThreadPoolExecutor
*/
public void startWatchingForRecoveryLogs() throws KeeperException, InterruptedException {
int threadPoolSize = this.conf.getCount(Property.TSERV_WAL_SORT_MAX_CONCURRENT);
public void startWatchingForRecoveryLogs(int threadPoolSize)
throws KeeperException, InterruptedException {
ThreadPoolExecutor threadPool =
ThreadPools.getServerThreadPools().getPoolBuilder(TSERVER_WAL_SORT_CONCURRENT_POOL)
.numCoreThreads(threadPoolSize).enableThreadPoolMetrics().build();
Expand Down

0 comments on commit ed56a8c

Please sign in to comment.