You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _deferredProjectEvalIdToImportedProjects should be ensured to be called only from the BuildEventArgs handlers - so in a synchronized context. Then we can gt rid of any synchronization on it
What needs to be done
The handler of BuildCheckBuildEventHandler.HandleProjectEvaluationStartedEvent and ProcessProjectEvaluationStarted needs to be separated, as currently we cannot distinguish the situation "ProjectEvaluationStartedEvent occured, but it was received through logging infrastructure".
The reason for the 2 possible sources of the event (through the logging or directly from engine) is due to the fact that the BuildCheckManager can live in the worker node as well.
The ProjectImported data are to be received only via the logging infrastructure - so it should be handled only in the handler of BuildCheckBuildEventHandler.HandleProjectEvaluationStartedEvent. Since the logging infra guarantees synchronized (single threaded) delivery of events - we can then be sure that all handling of the ProjectImported data happens without concurrency risks and any synchronization (or usage of ConcurrentDictionary) can be removed. This should significantly simplify the code
The text was updated successfully, but these errors were encountered:
Context
#10959 (comment)
The
_deferredProjectEvalIdToImportedProjects
should be ensured to be called only from theBuildEventArgs
handlers - so in a synchronized context. Then we can gt rid of any synchronization on itWhat needs to be done
The handler of
BuildCheckBuildEventHandler.HandleProjectEvaluationStartedEvent
andProcessProjectEvaluationStarted
needs to be separated, as currently we cannot distinguish the situation "ProjectEvaluationStartedEvent occured, but it was received through logging infrastructure".The reason for the 2 possible sources of the event (through the logging or directly from engine) is due to the fact that the BuildCheckManager can live in the worker node as well.
The
ProjectImported
data are to be received only via the logging infrastructure - so it should be handled only in the handler ofBuildCheckBuildEventHandler.HandleProjectEvaluationStartedEvent
. Since the logging infra guarantees synchronized (single threaded) delivery of events - we can then be sure that all handling of theProjectImported
data happens without concurrency risks and any synchronization (or usage of ConcurrentDictionary) can be removed. This should significantly simplify the codeThe text was updated successfully, but these errors were encountered: