Hi,

Of course the index should not get corrupt in the first place. If you have
a simple, reproducible test case that reproduces the corrupt index
(starting with a fresh database) with the latest version of H2, could you
please post it?

Regards,
Thomas


On Wed, May 22, 2013 at 5:30 PM, Sanjeev Gour <[email protected]>wrote:

> We are having an index on a table that results in error while deleting
> data from the table. The error says that it cannot find a row in the index.
> The following discussion we posted earlier has detailed explanation about
> it-
>
> Discussion 
> link<https://groups.google.com/forum/?fromgroups#!searchin/h2-database/org.h2.jdbc.JdbcSQLException$3A$20Row$20not$20found$20when$20trying$20to$20delete$20from$20index$20%7Csort:relevance/h2-database/awQR6dY5ZPY/bGizOaCaB0kJ>
>
> We are trying to work around this problem by dropping the index and
> recreate it when the error occurs something like this-
> try{
> ACQUIRE DISK LOCK
> {
> try{
>     DELETE FROM TABLE WHERE ..... //this throws the index error that it
> cannot find the row in the index
> }catch(Exception e){
>     try{
>        DROP INDEX
>        try{
>            RECREATE THE INDEX
>        }catch{
>            LOG RECREATE FAILURE
>        }
>     }catch{
>        LOG DROP FAILURE
> }
> finally{
>     RELEASE DISC LOCK
> }
>
> The problem we are facing is that the DROP is showing any error but while
> creating the index we are seeing the following error-
>
> org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "METRIC_DATA";
> SQL statement:
> create index timeseries.idx_metric_data_start_time on
> timeseries.metric_data(start_time) [50200-168]
>
> We are not sure how H2 is handling locking on the tables internally. We
> are using the following parameters in the JDBC url-
>
> CACHE_TYPE=LRU;PAGE_SIZE=16384;MVCC=TRUE;DB_CLOSE_DELAY=-1
>
> Any help to resolve this is much appreciated.
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to