Technoboy- commented on issue #19968:
URL: https://github.com/apache/pulsar/issues/19968#issuecomment-1490114695

   > I believe this is caused because the Broker Service only checks for 
expiration of topics / subscriptions / messages for topics or bundles that it 
actually has loaded in its local cache. There appear to be several 
circumstances where a particular set of topics (namespace bundle?) is not owned 
by any broker, and thus nothing related to those topics (messages, 
subscriptions, or topics themselves) will ever be checked for expiration unless 
more messages are published to a topic in that bundle and it happens to get 
loaded.
   I really went down the rabbit hole on this one. Part of the issue is that 
there isn't much documentation on how these features actually work. I ended up 
modifying the Pulsar source to output more debugging information before 
realizing the idle topics I was seeing were never even entering the checkGC() 
function in PersistentTopic.java where all of this logic lives. Upon restarting 
the brokers in my cluster (I've got two brokers in my test cluster), it looks 
like none of the topic bundles get loaded by default. But it also appears that 
the broker will occasionally just unload an idle topic bundle. I can see why 
that might be desirable, but it defeats the inactive entity purging features.
   
   yes, right. 
   
   
   >Sometimes it seems the message TTL isn't being honored and the 
subscriptions never expire
   
   Maybe there are some connected consumers, need to disconnect them.


-- 
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]

Reply via email to