diff options
author | innokentii <innokentii@yandex-team.com> | 2023-04-11 11:44:51 +0300 |
---|---|---|
committer | innokentii <innokentii@yandex-team.com> | 2023-04-11 11:44:51 +0300 |
commit | a9ea4f5cd408a436d0dc2200c68c3406b35a8589 (patch) | |
tree | b56d284e944518f920be0019a5d29b96e8e2fbc0 | |
parent | a628bac8edf4191cdb5679f39ae4815f2affbbd9 (diff) | |
download | ydb-a9ea4f5cd408a436d0dc2200c68c3406b35a8589.tar.gz |
Fix incorrect incoming message handling in net_classifier
fix incorrect incoming message handling in net_classifier
-rw-r--r-- | ydb/core/mind/address_classification/net_classifier.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ydb/core/mind/address_classification/net_classifier.cpp b/ydb/core/mind/address_classification/net_classifier.cpp index 11c7e6750c..c14992d9e8 100644 --- a/ydb/core/mind/address_classification/net_classifier.cpp +++ b/ydb/core/mind/address_classification/net_classifier.cpp @@ -99,6 +99,21 @@ private: hFunc(TEvConfigsDispatcher::TEvGetConfigResponse, HandleWhileIniting); hFunc(TEvents::TEvWakeup, HandleWhileIniting); hFunc(TEvNetClassifier::TEvUpdateTimedCounters, UpdateTimedCounters); + default: + EnqueueEvent(ev); + break; + } + } + + void EnqueueEvent(TAutoPtr<IEventHandle> &ev) { + EventsQueue.push_back(ev); + } + + void ProcessEnqueuedEvents() { + while (!EventsQueue.empty()) { + TAutoPtr<IEventHandle> &ev = EventsQueue.front(); + TlsActivationContext->Send(ev.Release()); + EventsQueue.pop_front(); } } @@ -224,6 +239,8 @@ private: mon->RegisterActorPage(page, "netclassifier", "NetClassifier", false, Ctx().ExecutorThread.ActorSystem, Ctx().SelfID); } + ProcessEnqueuedEvents(); + BroadcastClassifierUpdate(); } @@ -395,6 +412,7 @@ private: private: TMaybe<TString> MaybeNetDataFilePath; TMaybe<TInstant> MaybeNetDataFileModTs; + TDeque<TAutoPtr<IEventHandle>> EventsQueue; TLabeledAddressClassifier::TConstPtr LabeledAddressClassifier; TMaybe<TInstant> NetDataUpdateTimestamp; |