MCPcopy Create free account
hub / github.com/apache/impala / SetLastTopicVersionProcessed

Method SetLastTopicVersionProcessed

be/src/statestore/statestore.cc:639–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639void Statestore::Subscriber::SetLastTopicVersionProcessed(const TopicId& topic_id,
640 TopicEntry::Version version) {
641 // Safe to call concurrently for different topics because 'subscribed_topics' is not
642 // modified.
643 Topics* subscribed_topics = GetTopicsMapForId(topic_id);
644 Topics::iterator topic_it = subscribed_topics->find(topic_id);
645 // IMPALA-7714: log warning to aid debugging in release builds without DCHECK.
646 if (UNLIKELY(topic_it == subscribed_topics->end())) {
647 LOG(ERROR) << "Couldn't find subscribed topic " << topic_id;
648 }
649 DCHECK(topic_it != subscribed_topics->end()) << topic_id;
650 topic_it->second.last_version.Store(version);
651}
652
653void Statestore::Subscriber::RefreshLastHeartbeatTimestamp(bool received_heartbeat) {
654 DCHECK_GE(MonotonicMillis(), last_heartbeat_ts_.Load());

Callers 1

SendTopicUpdateMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected