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: creating promise for every delayed saving to await #30

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

Farenheith
Copy link
Member

@Farenheith Farenheith commented Jun 17, 2023

In the first algorithm, there could be calls to be accumulated in the same saving moment, bug with no savingPromise defined yet to await, making them susceptible to be ended after the semaphore release. With this change. the awaitPromise is generated synchronously just after the first request to be accumulated is received, so, every accumulating promise will start to await for it too to complete.

I'll figure out later how to write a test that checks this specific error case

@Farenheith Farenheith force-pushed the fix-saving-delay-semaphore-bug branch from 92c9242 to 3dd7d6b Compare June 17, 2023 13:19
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Farenheith Farenheith merged commit 9115034 into master Jun 17, 2023
codibrebot pushed a commit that referenced this pull request Jun 17, 2023
## [1.8.3](v1.8.2...v1.8.3) (2023-06-17)

### Bug Fixes

* creating promise for every delayed saving to await ([#30](#30)) ([9115034](9115034))
@codibrebot
Copy link

🎉 This PR is included in version 1.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants