Skip to content

Commit

Permalink
Increase journal thread priority (#4120)
Browse files Browse the repository at this point in the history
  • Loading branch information
hangc0276 authored Jan 5, 2024
1 parent 031069c commit 381510e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ public ForceWriteThread(Thread threadToNotifyOnEx,
boolean enableGroupForceWrites,
StatsLogger statsLogger) {
super("ForceWriteThread");
this.setPriority(Thread.MAX_PRIORITY);
this.threadToNotifyOnEx = threadToNotifyOnEx;
this.enableGroupForceWrites = enableGroupForceWrites;
this.forceWriteThreadTime = statsLogger.getThreadScopedCounter("force-write-thread-time");
Expand Down Expand Up @@ -650,6 +651,7 @@ public Journal(int journalIndex, File journalDirectory, ServerConfiguration conf
public Journal(int journalIndex, File journalDirectory, ServerConfiguration conf,
LedgerDirsManager ledgerDirsManager, StatsLogger statsLogger, ByteBufAllocator allocator) {
super(journalThreadName + "-" + conf.getBookiePort());
this.setPriority(Thread.MAX_PRIORITY);
this.allocator = allocator;

StatsLogger journalStatsLogger = statsLogger.scopeLabel("journalIndex", String.valueOf(journalIndex));
Expand Down

0 comments on commit 381510e

Please sign in to comment.