@@ -177,8 +177,13 @@ private synchronized Optional<Handle> internalAcquire(long permits, Consumer<Han
177
177
return Optional .of (new Handle (maxReadsInFlightSize , handle .creationTime , true ));
178
178
} else {
179
179
if (queuedHandles .size () >= maxReadsInFlightAcquireQueueSize ) {
180
- log .warn ("Failed to queue handle for acquiring permits: {}, creationTime: {}, remainingBytes:{}" ,
181
- permits , handle .creationTime , remainingBytes );
180
+ log .warn ("Failed to queue handle for acquiring permits: {}, creationTime: {}, remainingBytes:{},"
181
+ + " maxReadsInFlightAcquireQueueSize:{}, pending-queue-size: {}, please increase broker"
182
+ + " config managedLedgerMaxReadsInFlightPermitsAcquireQueueSize and confirm the configuration of"
183
+ + " managedLedgerMaxReadsInFlightSizeInMB and"
184
+ + " managedLedgerMaxReadsInFlightPermitsAcquireTimeoutMillis are suitable." ,
185
+ permits , handle .creationTime , remainingBytes , maxReadsInFlightAcquireQueueSize ,
186
+ queuedHandles .size ());
182
187
return Optional .of (new Handle (0 , handle .creationTime , false ));
183
188
} else {
184
189
queuedHandles .offer (new QueuedHandle (handle , callback ));
@@ -223,15 +228,17 @@ private synchronized void timeoutCheck() {
223
228
}
224
229
225
230
private void handleTimeout (QueuedHandle queuedHandle ) {
226
- if (log .isDebugEnabled ()) {
227
- log .debug ("timed out queued permits: {}, creationTime: {}, remainingBytes:{}" ,
228
- queuedHandle .handle .permits , queuedHandle .handle .creationTime , remainingBytes );
229
- }
231
+ log .warn ("timed out queued permits: {}, creationTime: {}, remainingBytes:{}, acquireTimeoutMillis: {}. Please"
232
+ + " review whether the BK read requests is fast enough or broker config"
233
+ + " managedLedgerMaxReadsInFlightSizeInMB and managedLedgerMaxReadsInFlightPermitsAcquireTimeoutMillis"
234
+ + " are suitable" ,
235
+ queuedHandle .handle .permits , queuedHandle .handle .creationTime , remainingBytes , acquireTimeoutMillis );
230
236
try {
231
237
queuedHandle .callback .accept (new Handle (0 , queuedHandle .handle .creationTime , false ));
232
238
} catch (Exception e ) {
233
- log .error ("Error in callback of timed out queued permits: {}, creationTime: {}, remainingBytes:{}" ,
234
- queuedHandle .handle .permits , queuedHandle .handle .creationTime , remainingBytes , e );
239
+ log .error ("Error in callback of timed out queued permits: {}, creationTime: {}, remainingBytes:{},"
240
+ + " acquireTimeoutMillis: {}" ,
241
+ queuedHandle .handle .permits , queuedHandle .handle .creationTime , remainingBytes , acquireTimeoutMillis , e );
235
242
}
236
243
}
237
244
0 commit comments