BewareMyPower commented on issue #12616:
URL: https://github.com/apache/pulsar/issues/12616#issuecomment-966757036
@Jason918
I tried to modify my test to
```java
managedLedger.getConfig().setRetentionTime(0, TimeUnit.MILLISECONDS);
managedLedger.rollCurrentLedgerIfFull(); // the rollover is
asynchronous
// unload and load
admin.topics().unload(topic);
Thread.sleep(2000);
admin.lookups().lookupTopic(topic);
final ManagedLedgerImpl managedLedger2 =
pulsar.getBrokerService().getTopicIfExists(partitionName).get()
.map(topicObject -> (ManagedLedgerImpl) ((PersistentTopic)
topicObject).getManagedLedger())
.orElse(null);
assertNotNull(managedLedger2);
final List<LedgerInfo> ledgerInfoList2 =
managedLedger2.getLedgersInfoAsList();
final Position lastConfirmedEntry2 =
managedLedger2.getLastConfirmedEntry();
```
The `lastConfirmedEntry` didn't change. At the same time, instead of
removing old ledgers, after `unload` and `lookup` again, the old ledgers were
not removed.
--
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]