nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
124 stars 40 forks source link

Fix: MeteorApply as alternative to Meteor.apply, to log delayed sent method calls (SOFIE-3236) #1202

Closed nytamin closed 2 weeks ago

nytamin commented 3 weeks ago

…1190)

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a: Code improvement

New behaviour

It is in Meteor's nature to only send a single method call at a time, so if a previous method call takes a long time to finish executing (or the response was delayed due to network issues), the next method call will be delayed. When this happens, we currently don't have a way to detect that this has happened, and have no way of knowing which method was delayed, and why.

This PR attempts to help troubleshooting this by adding logging for when a client method is sent late, due to being blocked by other method calls from that client.

Testing

Affected areas

This PR affects how the web client sends data to the server.

Time Frame

Fairly high priority, we'll likely look into merging this withing the week.

Other Information

Status

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 40.96386% with 98 lines in your changes missing coverage. Please review.

Project coverage is 58.07%. Comparing base (eac0a9d) to head (fcd7331). Report is 7 commits behind head on release50.

Files Patch % Lines
meteor/lib/MeteorApply.ts 36.00% 96 Missing :warning:
meteor/lib/logging.ts 66.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release50 #1202 +/- ## ============================================= + Coverage 57.99% 58.07% +0.07% ============================================= Files 481 484 +3 Lines 79177 79590 +413 Branches 3479 3608 +129 ============================================= + Hits 45916 46219 +303 - Misses 33240 33365 +125 + Partials 21 6 -15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.