You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/24 01:30:51 UTC
[GitHub] [pulsar] mattisonchao opened a new pull request, #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
mattisonchao opened a new pull request, #15282:
URL: https://github.com/apache/pulsar/pull/15282
### Motivation
When the topic is unloaded, may cause the redelivery of messages. the cases as below:
- When `individualDeletedMessages` exceeds `maxUnackedRangesToPersist`.
- When the cursor is closing, there may be other acks that are executing asynchronously, causing the cursor to persist not the latest `individualDeletedMessages`.
We can add `individualDeletedMessagesSize` to the log to help pinpoint the problem.
### Modifications
- Add `individualDeletedMessagesSize` to log.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Documentation
- [x] `no-need-doc`
(Please explain why)
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
Posted by GitBox <gi...@apache.org>.
mattisonchao commented on code in PR #15282:
URL: https://github.com/apache/pulsar/pull/15282#discussion_r865421196
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2355,7 +2361,8 @@ public void operationFailed(ManagedLedgerException e) {
persistPositionMetaStore(-1, position, properties, new MetaStoreCallback<Void>() {
@Override
public void operationComplete(Void result, Stat stat) {
- log.info("[{}][{}] Closed cursor at md-position={}", ledger.getName(), name, markDeletePosition);
+ log.info("[{}][{}] Closed cursor at md-position={} individualDeletedMessagesSize={}",
+ ledger.getName(), name, markDeletePosition, individualDeletedMessages.size());
Review Comment:
Well, it looks like the log here is not accurate, I will add a log in front
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Technoboy- commented on a diff in pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
Posted by GitBox <gi...@apache.org>.
Technoboy- commented on code in PR #15282:
URL: https://github.com/apache/pulsar/pull/15282#discussion_r857059047
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2355,7 +2361,8 @@ public void operationFailed(ManagedLedgerException e) {
persistPositionMetaStore(-1, position, properties, new MetaStoreCallback<Void>() {
@Override
public void operationComplete(Void result, Stat stat) {
- log.info("[{}][{}] Closed cursor at md-position={}", ledger.getName(), name, markDeletePosition);
+ log.info("[{}][{}] Closed cursor at md-position={} individualDeletedMessagesSize={}",
+ ledger.getName(), name, markDeletePosition, individualDeletedMessages.size());
Review Comment:
Log `individualDeletedMessages.size()` seems useless.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao closed pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
Posted by GitBox <gi...@apache.org>.
mattisonchao closed pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
URL: https://github.com/apache/pulsar/pull/15282
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] gaoran10 commented on a diff in pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
Posted by GitBox <gi...@apache.org>.
gaoran10 commented on code in PR #15282:
URL: https://github.com/apache/pulsar/pull/15282#discussion_r865527097
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2333,6 +2338,9 @@ public void closeFailed(ManagedLedgerException exception, Object ctx) {
*/
void persistPositionWhenClosing(PositionImpl position, Map<String, Long> properties,
final AsyncCallbacks.CloseCallback callback, final Object ctx) {
+ log.info("Persistence before cursor close is in progress. position={} "
Review Comment:
I'm not sure that we need to add this log, it seems that there are logs when this operation was completed successfully or not.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15282: [improve][broker] Add `individualDeletedMessagesSize` to log when cusor close.
Posted by GitBox <gi...@apache.org>.
mattisonchao commented on code in PR #15282:
URL: https://github.com/apache/pulsar/pull/15282#discussion_r865603173
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2333,6 +2338,9 @@ public void closeFailed(ManagedLedgerException exception, Object ctx) {
*/
void persistPositionWhenClosing(PositionImpl position, Map<String, Long> properties,
final AsyncCallbacks.CloseCallback callback, final Object ctx) {
+ log.info("Persistence before cursor close is in progress. position={} "
Review Comment:
Move this log to `ManagedCusrorImpl#buildIndividualDeletedMessageRanges `.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org