File tree Expand file tree Collapse file tree
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1151,14 +1151,17 @@ public void run() {
11511151 journalFlushWatcher .stop ().elapsed (TimeUnit .NANOSECONDS ), TimeUnit .NANOSECONDS );
11521152
11531153 // Trace the lifetime of entries through persistence
1154- for (QueueEntry e : toFlush ) {
1155- if (e != null ) {
1156- log .debug ()
1157- .attr ("ledgerId" , e .ledgerId )
1158- .attr ("entryId" , e .entryId )
1159- .log ("Written and queuing for flush" );
1154+ RecyclableArrayList <QueueEntry > flushedEntries = toFlush ;
1155+ log .debug (e -> {
1156+ for (QueueEntry entry : flushedEntries ) {
1157+ if (entry != null ) {
1158+ log .debug ()
1159+ .attr ("ledgerId" , entry .ledgerId )
1160+ .attr ("entryId" , entry .entryId )
1161+ .log ("Written and queuing for flush" );
1162+ }
11601163 }
1161- }
1164+ });
11621165
11631166 journalStats .getForceWriteBatchEntriesStats ()
11641167 .registerSuccessfulValue (numEntriesToFlush );
You can’t perform that action at this time.
0 commit comments