Race condition between file reset and i18n initialization [๐]
See original GitHub issue๐ Bug report
Description
The function lib/startup/restoreOverwrittenFilesWithOriginals
(called in server.js
early on) copies the i18n locale files into the folder /i18n
where they are expected to exist by the i18n.configure
call (later in server.js
) or later, particularly when it tries to do auto-reloading whenever a locale file changes, which might be triggered by the still ongoing copy job.
Smells like a race condition. Affects test runs frequently but also regular server starts sometimes.
Is this a regression?
Present since i18n with auto-reloading was introduced, but it seems to occur more often recently.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Race condition between file reset and i18n initialization [๐]
The function lib/startup/restoreOverwrittenFilesWithOriginals (called in server.js early on) copies the i18n locale files into the folder /i18n ...
Read more >[deleted] - Profile - Bountysource
[deleted] commented on this issueRace condition between file reset and i18n initialization [๐] . juice-shop 1 year ago.
Read more >A new approach to detect potential race conditions in ...
paper, we focus on such a specific requirement: race conditions issues in component-based systems. We present a heuristic that.
Read more >3.7 Race Conditions - FreeBSD Documentation
A race condition is anomalous behavior caused by the unexpected dependence on the relative timing of events. In other words, a programmer incorrectlyย ......
Read more >next.js - Handle file changes with i18next - Stack Overflow
I'm using next.js with i18n and when I initialize my i18n.js , I'm loading the files with the translations files this way:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bkimminich Yeah sureโฆ I was thinking on the same lines. Should I go ahead with the PR?
Looks good to me, gotta test it next week.
Maybe @J12934 can also take a look b/c heโs our official async-await-expertโฆ ๐ Btw, does this change affect server start-up time calculation? ๐งฎ