[
https://issues.apache.org/jira/browse/KAFKA-9164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16970627#comment-16970627
]
ASF GitHub Bot commented on KAFKA-9164:
---------------------------------------
bdbyrne commented on pull request #7672: KAFKA-9164: Improve producer topic
expiry logic to account for last a…
URL: https://github.com/apache/kafka/pull/7672
…ccess time.
Note one, this changes the ProducerMetadata to longer record a sentinel
TOPIC_EXPIRY_NEEDS_UPDATE upon topic map emplacement. What this value was doing
was protecting the topic from being evicted on the first retainTopic() call,
however I would anticipate that 5 minutes is plenty of guard, especially since
a metadata update is forced immediately when a new topic arrives.
Note two, in the accumulator, the current time is being calculated under
lock, which might suggest that the times need to be ascending. However it
doesn't appear that this is necessary, since the tryAppend also calculates the
current time outside of the lock, and ProducerBatch is fairly relaxed on how it
uses this value (nothing for correctness).
Please let me know if there's any error in my understanding.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Don't evict active topics' metadata from the producer's cache
> -------------------------------------------------------------
>
> Key: KAFKA-9164
> URL: https://issues.apache.org/jira/browse/KAFKA-9164
> Project: Kafka
> Issue Type: Bug
> Components: producer
> Reporter: Brian Byrne
> Assignee: Brian Byrne
> Priority: Minor
>
> The producer's metadata currently marks a topic as "not needing to be
> retained" if it has been 5 minutes since it was first considered, regardless
> of whether records were being actively produced for the topic. This shouldn't
> happen and should be fixed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)