You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/10/03 22:21:37 UTC
[GitHub] rdhabalia opened a new pull request #810: Fix testActiveAndInActiveConsumerEntryCacheBehavior
rdhabalia opened a new pull request #810: Fix testActiveAndInActiveConsumerEntryCacheBehavior
URL: https://github.com/apache/incubator-pulsar/pull/810
### Motivation
As mentioned at #806 , `testActiveAndInActiveConsumerEntryCacheBehavior` tries to produce messages and consumes it. with the last published and consumed message, broker [discards](https://github.com/apache/incubator-pulsar/blob/master/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L1399) all the messages up to cursor's lastReadPosition from `EntryCache`. However, it's not necessary that cursor's readPosition is updated with last-position when `discardEntriesFromCache` gets triggered.
So, entry-cache may have 1 entry left in case `discardEntriesFromCache` gets triggered before `entryCache.asyncReadEntry(..)` reads entry and updates the position.
### Modifications
- add delta of 1 entry in entry-cache size assertion
- add retry while checking entryCache-cleanup on subscriber-close.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services