Reindex field in multi-user mode

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Sep 24 07:08:36 CDT 2013


Hello,

On Sep 24, 2013, at 2:53 PM, François Van Lerberghe <frvanlerberghe at gmail.com> wrote:

> Hello,
> 
> In multi-user mode, is it safe to write
>    Vdatabase.SqlExecute("REINDEX FIELD myTableName.myFieldName")
> 
> What does happen if an other user
>    - have locked a record of myTableName in read and write mode
>    or
>    - send this same code in the same time
>    or
>    - make a query using this field/index in the very same time
> 
> Must I lock the entire table in write mode (EVLockType.kReadWrite) before
> sending this sql query ?
> 


This is safe for any type of vServer (2 or more users works similarly on some single vServer instance).
This is safe in local mode for MT-builds (vKernel_MT...) only.
But you have to use some external mutexes for "simple" local builds to avoid multithreaded issues like data races and so on.
Anyway, it is not about vTable/vCursor related "record locks".

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