0

I have tried to find the answer but still didn't get the solution.

In a binary tree auto spillage system. Say that member "A" has two legs, left and right (both still empty). When a new member ("B") comes to make registration, the system checks if the left legs of A is still empty and of course it is, the system then 'remember' the left legs of "A" as an 'empty' slot and will give it to "B". "B" takes some minutes to complete the registration until it done. So far so good.

The problem comes from here :

During the completion of "B" registration. Other new member, "C", make a registration as well. The system checks if the left legs of A is still empty and of course it is ( because "B" not yet complete the query).

When registration of B has done, the left leg of A is fill by B. But when C has done, C overwrite the B.

What should I do to solve this problem?

  • make every leg so that it can not only be full or empty but also in process.No wyou can't start a new process because a leg is full or in process. With some table and source code, help could be more specific. – nbk Oct 19 '19 at 00:27
  • Possible duplicate of [PHP and Concurrency](https://stackoverflow.com/questions/1712860/php-and-concurrency) – Progman Oct 19 '19 at 07:54

0 Answers0