提交 e146696c 编写于 作者: R Rajan 提交者: GitHub

add log and cleanup failed non-durable subscription (#444)

上级 19718e46
......@@ -1595,9 +1595,7 @@ public class ManagedCursorImpl implements ManagedCursor {
PositionImpl newReadPosition = ledger.getNextValidPosition(markDeletePosition);
PositionImpl oldReadPosition = readPosition;
if (log.isDebugEnabled()) {
log.debug("Rewind from {} to {}", oldReadPosition, newReadPosition);
}
log.info("[{}] Rewind from {} to {}", name, oldReadPosition, newReadPosition);
readPosition = newReadPosition;
} finally {
......
......@@ -446,6 +446,9 @@ public class PersistentTopic implements Topic, AddEntryCallback {
if (!subscriptionFuture.isDone()) {
subscriptionFuture.complete(subscription);
} else {
// failed to initialize managed-cursor: clean up created subscription
subscriptions.remove(subscriptionName);
}
return subscriptionFuture;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册