stream_topic_history: Let server help us with latest msg id for topics.

If we already have latest data for topics, we shouldn't pass on the
opportunity to update the latest message id for existing topics.
This commit is contained in:
Aman Agrawal 2024-06-27 06:01:50 +00:00 committed by Tim Abbott
parent d2d479ba61
commit cffae1439c
1 changed files with 4 additions and 2 deletions

View File

@ -187,8 +187,10 @@ export class PerStreamHistory {
const existing = this.topics.get(topic_name);
if (existing) {
// Trust out local data more, since it
// maintains counts.
// If we have a topic in our cache, we update
// the message_id to accurately reflect the latest
// message in the topic.
existing.message_id = message_id;
continue;
}