poorbarcode commented on code in PR #20823:
URL: https://github.com/apache/pulsar/pull/20823#discussion_r1266184168
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -1065,7 +1066,17 @@ public boolean trackDelayedDelivery(long ledgerId, long
entryId, MessageMetadata
delayedDeliveryTracker.get().resetTickTime(topic.getDelayedDeliveryTickTimeMillis());
long deliverAtTime = msgMetadata.hasDeliverAtTime() ?
msgMetadata.getDeliverAtTime() : -1L;
- return delayedDeliveryTracker.get().addMessage(ledgerId, entryId,
deliverAtTime);
+ try {
+ return delayedDeliveryTracker.get().addMessage(ledgerId,
entryId, deliverAtTime);
+ } catch (OutOfDirectMemoryError ex) {
Review Comment:
In general, the Error type is not recommended to catch, we should use these
two ways to solve the problem
- Set the maximum memory usage of the delay message. If the delay message
usage exceeds the maximum memory usage, stuck new read
- we should kill the process if the error occurs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]