Questions tagged [race-condition]

4 questions
6
votes
3 answers

Checking if a file exists before writing. Always avoid, or sensible with the right use case?

There are few reliable absolutes in this world. One I have relied on is the idea that checking if a file exists before doing something with it just creates an unwanted race condition. Meaning between the check and the attempt at usage, the OS was…
candied_orange
  • 119,268
2
votes
3 answers

Race condition when issuing a refresh token: worth addressing or not?

I'm quite new to the world of access and refresh tokens, so bear with me. Client uses its refresh token to get a new access token. The server invalidates the just used refresh token and contextually issues the new access token and a new refresh…
Fabio A.
  • 125
  • 5
2
votes
2 answers

Avoid updating multiple Aggregates in Library Application

I am currently analysing the project ddd-library which is really helping in learning designing a system based on DDD principles. However there is one thing I have a problem with. In case of placing a book on hold, first the Patron Aggregate is…
1
vote
2 answers

Phantom read race condition keeping RDBMS in sync with external storage

Here's an interesting scenario, consider a cache with many buckets, and resources that can be shared between buckets: Bucket Highest to lowest priority Foo A, B, C, D Bar B, C, D Baz A In the example above Foo and Bar share the…