Comments (4)
You might not even need that line, if your website does not have many users simultaneously trying to reserve resources. You can change the value as long as you keep the randomness, it's the randomness that decreases the probability of the issue happening.
Two times? Hmmm, interesting, thanks for letting us know, from my understanding of the code, it should only be called once, I need to dive further into this.
from app.
Hi, yes I added that one, in commit 41d71f7
The issue is that there is a racing condition in which if two or more users reserve the same resource at the exact same time then only the last one gets displays even though both succeeded in reserving the item, check here for more details:
https://forums.bookedscheduler.com/viewtopic.php?f=3&t=423
I know that this is not the ideal solution and it's only a temporary one, until I have some opening in my schedule do dedicate myself to Booked more. But seeing as we already experienced this issue I rather have this than having no fix at all. It's still possible to have a race condition but the probability is a lot lower..
from app.
Thanks for the explanation and all the work you are doing to maintain that software.
Does the duration has to be that long for the fix to work?
I noticed by profiling when updating a reservation that this gets called twice.
from app.
Sorry, but I don't understand the logic here.
I understand the aim of this fix is to avoid two users reserve the same resource at the exact same time T.
But the fix only move the problem : now, if user A reserve resource at time T (with a sleep(6) for instance) then the issue will happening with user B who :
- reserve resource at time T and also get sleep(6)
- reserve resource at time T+1 and get sleep(5)
- reserve resource at time T+2 and get sleep(4)
- reserve resource at time T+3 and get sleep(3)
I really don't get how probabilities are changed even with adding randomness, since reservations are also random (User can reserve anytime).
from app.
Related Issues (20)
- That email address is not from an allowed domain HOT 1
- Docker compose not working HOT 1
- Slow creating and updating bookings HOT 1
- No reservation work / "Trying to access array offset on null" HOT 1
- API authentication issue when enable Active Directory authentication plugin
- Try ldap configuration HOT 3
- accessories administration
- Make "View availability" show up the next 7 days HOT 4
- Error after update latest Libre HOT 5
- Stripe Sources API deprecated - migrate to Payment Intents
- Member with status "inactiv"
- remove legend bar from schedule HOT 2
- PHP Warnings in Logs
- ini_set() warnings in cron logs
- Upgrade 2.8.5.5 -> 2.8.6.1 - SQL ERROR HOT 7
- Problems with character encoding v2.8.6.1 HOT 1
- Error: No reCAPTCHA clients exist.
- Smarty template implementation flaws
- No navigation to resource group/type/status management?
- Loading reservations ...., no calendar entries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.