Hi Mateusz,

The error means that you database is not consistent with index. Database
has 2 records with the same key, so Unique index can't be built. Such db
state should not be possible.
Could you check how the records  #43:152 and #43:151 were created? Is that
a duplication of the same record? Did they were created in transaction?

To fix your db you can resolve the conflict manually and run index rebuild
one more time. However we should find a cause to prevent this in future.

Best regards,
Artem Orobets

* Orient Technologiesthe Company behind OrientDB*


2014-06-19 4:59 GMT+03:00 Mateusz Dymczyk <[email protected]>:

> OrientDB version: 1.7.3
>
> I unfortunately don't have the DB, but what happened is I had to force
> close my app (which means the DB was also not closed properly). During
> restart the DB tried to recover and rebuild all the indices, most of them
> got rebuilt properly but one:
>
> 2014-06-19 09:20:13.692 [OrientDB rebuild indexes] INFO
>  c.o.o.c.i.OIndexRebuildOutputListener - - Rebuilding index db.myIdx
> (estimated 141 items)...
> 2014-06-19 09:20:13.877 [OrientDB rebuild indexes] INFO
>  c.o.o.c.i.OIndexRebuildOutputListener - --> OK, indexed 138 items in 185 ms
> 2014-06-19 09:20:13.897 [OrientDB rebuild indexes] ERROR
> c.o.o.c.i.OIndexManagerShared$RecreateIndexesTask - Error during addition
> of index {type:UNIQUE,algorithm:SBTREE,valueContainerA
>
> lgorithm:NONE,name:myIdx,indexDefinition:{className:entry,field:key,keyType:STRING,collate:default,nullValuesIgnored:true},indexDefinitionClass:com.orientechnologies.orient
> .core.index.OPropertyIndexDefinition,clusters:[1],mapRid:#1:13}
> com.orientechnologies.orient.core.index.OIndexException: Error on
> rebuilding the index for clusters: [entry]
>         at
> com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:432)
> ~[orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.createAutomaticIndex(OIndexManagerShared.java:527)
> [orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndex(OIndexManagerShared.java:500)
> [orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndexes(OIndexManagerShared.java:474)
> [orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.run(OIndexManagerShared.java:463)
> [orientdb-core-1.7.3.jar:1.7.3]
>         at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
> Caused by:
> com.orientechnologies.orient.core.storage.ORecordDuplicatedException:
> Cannot index record #43:152: found duplicated key 'SOME_KET' in index '
> myIdx' previously assigned to the record #43:151
>         at
> com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:54)
> ~[orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:33)
> ~[orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexAbstract.populateIndex(OIndexAbstract.java:881)
> ~[orientdb-core-1.7.3.jar:1.7.3]
>         at
> com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:394)
> ~[orientdb-core-1.7.3.jar:1.7.3]
>         ... 5 common frames omitted
>
> Is this a known issue? Other indices were restored properly but they are
> rather smaller (1-30 entries).
>
> Mateusz
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to