Backup

Ivan Smahin ivan_smahin at paradigmasoft.com
Thu Feb 14 03:03:39 CST 2008


Morning Bart,

>>>Hello Mr.,
Sorry for this - just reply-template needs some tuning :)

Thursday, February 14, 2008, 10:13:30 AM, you wrote:

> Good Morning Ivan,


>>> 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

I mean following:
Assume  some  operation  like  backup  locked  the  kernel. This time,
another  client  tries  to  operate with server sending some command -
SqlSelect for instance.
Server    accept    this    command   and   tries   to take the kernel
mutex. So it is waiting now for mutex being released by backup.
Client is waiting for server response too.

Backup is finished. Mutex is taken and SqlSelect is passed to kernel, get
some results and send it back to the client.

So  you  should  not  worry  about some "inserts" from another clients
during scheduled operation.

BTW,  Backup  is  implemented  in  very efficient  manner  -  it  is almost
instant.  Bigger  database will be backuped longer but here is linear
dependence.


Another thing we are going to improve right now.
Currently,  MaxClientTimeout   from  ini  file  actually defines two
different things:

1. The client idle time - before being disconnected.

2.  The  time interval which is provided by the server for any command
issued by the client.
In   other  words if you set timeout to 5 minutes and your query takes
more time you will be disconnected. Note, your query execution time may
vary because of clients competition, scheduled tasks and kernel state.
So generally it may happens even for "simple" calls.

It  is  not  a bug but mechanics to prevent situation when some client
may lock the server forever with infinite loop in stored procedure for
example.

But we think it should be split on two different timeout settings:

MaxIdleClientTimeout for 1)
MaxExecutionClientTimeout for 2)





-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list