orientdb: Can't create indexes on some classes.
OrientDB Version: 2.2.17
Java Version: 1.8.0_111
OS: Ubuntu 14.04.4
Expected behavior
I should be able to create or delete indexes. The following command should not generate an error.
CREATE INDEX Users.network_id ON Users (network_id) UNIQUE_HASH_INDEX
Actual behavior
When I try to create an index on my class, it generate the following error:
2017-04-06 04:39:38:398 INFO {db=MyDB} --> OK, indexed 10,615 items in 478 ms [OIndexRebuildOutputListener]$ANSI{green {db=MyDB}} Exception during index 'Users.network_id' creation
com.orientechnologies.orient.core.exception.OStorageException: Error during local hash table creation
DB name="MyDB"
at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.create(OLocalHashTable.java:195)
at com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine.create(OHashTableIndexEngine.java:94)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addIndexEngine(OAbstractPaginatedStorage.java:1607)
at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:247)
at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:129)
at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:40)
at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:167)
at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:87)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1922)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.execute(OCommandExecutorSQLCreateIndex.java:277)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:2624)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:2570)
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1473)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:597)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:336)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:200)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Caused by: com.orientechnologies.orient.core.exception.OStorageException: File with given name already exists but has different id 185 vs. proposed 2666873368795415589
DB name="MyDB"
at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.addFile(OWOWCache.java:488)
at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.addFile(O2QCache.java:187)
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.commitChanges(OAtomicOperation.java:415)
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:468)
at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:412)
at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:116)
at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.create(OLocalHashTable.java:189)
... 18 more
This only happens on my Users class. Other indexes still work fine. The index does not show up in the studio or in the console. I tried removing the index but it doesn’t look like it exist. I can’t create it and it keeps giving me the error.
The following also doesn’t work:
CREATE INDEX Users.network_id ON Users (network_id) UNIQUE
Is there a way to get rid of this error?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 56 (35 by maintainers)
@anber500 I will send you new build in few hours. It should fix your issue.