Skip to content
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

fix(digitalTwin): correct race condition #398

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

sebtiz13
Copy link
Member

What does this PR do ?

Add forgotten locks to fix race condition errors on digital twins

@sebtiz13 sebtiz13 self-assigned this Jan 29, 2025
lib/modules/device/DeviceService.ts Outdated Show resolved Hide resolved
lib/modules/device/DeviceService.ts Outdated Show resolved Hide resolved
lib/modules/device/DeviceService.ts Outdated Show resolved Hide resolved
lib/modules/device/DeviceService.ts Outdated Show resolved Hide resolved
@sebtiz13 sebtiz13 force-pushed the fix/KZLPRD-770-race-condition branch from 8a5fe12 to 596b8d5 Compare January 29, 2025 15:41
@sebtiz13 sebtiz13 force-pushed the fix/KZLPRD-770-race-condition branch from 58ecf38 to 2008b9e Compare January 30, 2025 09:40
@sebtiz13 sebtiz13 requested a review from Olive3034 January 30, 2025 09:42
Copy link
Contributor

@Olive3034 Olive3034 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to successive lock (upsert for example), now it takes up to 5200ms to perform an upsert.
So I guess, in those specific cases, we should unlock the mutex before calling a new successive action that will acquire the mutex ?

@sebtiz13 sebtiz13 force-pushed the fix/KZLPRD-770-race-condition branch from bc61a3b to 23562f8 Compare January 30, 2025 16:50
@sebtiz13 sebtiz13 merged commit 8da2861 into master Jan 30, 2025
13 checks passed
@sebtiz13 sebtiz13 deleted the fix/KZLPRD-770-race-condition branch January 30, 2025 17:26
github-actions bot pushed a commit that referenced this pull request Jan 30, 2025
## [2.7.1](v2.7.0...v2.7.1) (2025-01-30)

### Bug Fixes

* **digitalTwin:** correct race condition ([#398](#398)) ([8da2861](8da2861))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants