Backup

Mr. Bart Pietercil bart.pietercil at gmail.com
Thu Feb 14 02:13:30 CST 2008


Good Morning Ivan,


On 14-feb-08, at 08:58, Ivan Smahin wrote:

> Hello Mr.,
>
> Wednesday, February 13, 2008, 11:47:16 PM, you wrote:
>
>> Hi Ivan,
>> On 13-feb-08, at 22:26, Ivan Smahin wrote:
>
>>> Hello Mr.,
>>>
>>> Wednesday, February 13, 2008, 10:56:04 PM, you wrote:
>>>
>>>> Hi List,Ruslan,
>>>
>>>> Does anybody care to explain to me what exactly happens when a
>>>> VServer
>>>> is making a backup. I have a VServer on an interval of 1 hour. This
>>>> is
>>>> working flawless.
>>>
>>>> However I'm wondering what is happening while the VServer is  
>>>> making a
>>>> backup. Does it become unresponsive for clients making an attempt  
>>>> to
>>>> talk to the database?
>>>
>>> Well, obviously you mean not backup but scheduler - right?
>>> Just the most wanted command to run by schedule is backup.
>> right
>
>>>
>>>
>>> One of the service thread inside the server is for scheduler  
>>> purpose.
>>> You    are   preparing   event  via  SQL  and  then  vServer  
>>> scheduler
>>> calculates the nearest time to wake up and perform the task  
>>> defined in
>>> that event. So most of the time scheduler thread sleeps.
>>> Awaking, it performs the task very similar to regular client - so
>>> during
>>> task execution  kernel is locked out (but server is still able to
>>> accept commands
>>> from  another clients. The deal is - almost any command goes to  
>>> kernel
>>> -  so  most  of  the  client requests will be waiting for kernel
>>> mutex.).
>>>
>
>> This is what I mean. The scheduler takes the mutex when performing  
>> the
>> backup. So when , while the backup is being created (may take a few
>> seconds), ANOTHER client (in this case vPHP) wants to acces the  
>> kernel
>> (perform an insert let's say) what will happen ?
>
>> Insert will fail ? Is there an error thrown ?
>
> No - another client with its insert command will be just blocked on  
> mutex.

Do you mean that the insert will fail and no exception is raised or  
will the insert be cued and execute when the mutex is released?
I think it is an important issue as our databases are growing rapidly  
(and of course so does the backup time) and the chance of inserts or  
reads happening at the same time is also increasing

tia

Bart Pietercil





More information about the Valentina mailing list