-
Notifications
You must be signed in to change notification settings - Fork 638
New counter for activations (CurrentActivationTimeUsByActivity) #4938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New counter for activations (CurrentActivationTimeUsByActivity) #4938
Conversation
⚪
|
⚪
|
@@ -165,6 +175,12 @@ namespace NActors { | |||
AggregateOne(ActorsAliveByActivity, other.ActorsAliveByActivity); | |||
AggregateOne(ScheduledEventsByActivity, other.ScheduledEventsByActivity); | |||
AggregateOne(StuckActorsByActivity, other.StuckActorsByActivity); | |||
if (other.CurrentActivationTime.TimeUs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kruall в этом if thread sanitizer находит проблему - чтение данных, модифицируемых на другом потоке.
В следующем if происходит что-то совсем странное (хотя это проходит для tsan незамеченным) - идет обращение к контейнеру, который изменяется на другом потоке. Мне кажется понятно к чему это приводит.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Обсудили голосом.
- гонка по данным происходит когда специально выделенный поток проходится по всем TExecutorThreadStats и аггрегирует их, причем делает это за два прохода.
- с AggregatedCurrentActivationTime проблемы не происходит, потому что их может менять только поток, который собирает статистику
т.е. если в первом случае данные в other меняются в других потоках во момент сбора статистики, то с AggregatedCurrentActivationTime такого не происходит, их просто не трогают на тех потоках.
Changelog entry
...
Changelog category
Additional information
...