Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index is screw up #4089

Closed
martingg88 opened this issue May 6, 2015 · 14 comments
Closed

Index is screw up #4089

martingg88 opened this issue May 6, 2015 · 14 comments
Assignees
Labels
Milestone

Comments

@martingg88
Copy link

it try to screw up my index when i migrated from 2.0.8 to 2.1-rc2.
FYI. indexes are exist for 2.0.8 but it's rebuild and deleted at 2.1-rc2 due to following issue. any idea? this issue will only affect for hash index only. furtheremore, the save button is disabled when create index at studio.

2015-05-06 11:32:55:455 WARNING {db=sport} Cannot load index 'account.language' from storage (rid=#1:1012): rebuilt it from scratch [OIndexNotUnique]{db=sport} Cannot rebuild index 'account.language' from storage (rid=#1:1012) because 'java.lang.IllegalArgumentException: File with id 3560 not found in WOW Cache'. The index will be removed in configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name account.language.hib does not exist in storage sport

@swimmesberger
Copy link

Having a similar problem with 2.1-rc2 here. When orientdb is trying to rebuild the database via WAL I get following exception:

SEVERE: {db=system} Exception during storage data restore.
com.orientechnologies.orient.core.exception.OStorageException: File with name Mapping.localId.irs does not exist in storage system
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.openFile(OWOWCache.java:317)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.O2QCache.openFile(O2QCache.java:184)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreAtomicUnit(OAbstractPaginatedStorage.java:2293)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFrom(OAbstractPaginatedStorage.java:2237)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromFullCheckPoint(OAbstractPaginatedStorage.java:2198)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromCheckPoint(OAbstractPaginatedStorage.java:2187)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromWAL(OAbstractPaginatedStorage.java:2138)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreIfNeeded(OAbstractPaginatedStorage.java:1491)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:165)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:223)
    at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:287)
    at 
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'system' with mode=rw
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:210)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:223)
    at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:287)
    at 
Caused by: com.orientechnologies.orient.core.exception.OStorageException: File with name Mapping.localId.irs does not exist in storage system
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.openFile(OWOWCache.java:317)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.O2QCache.openFile(O2QCache.java:184)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreAtomicUnit(OAbstractPaginatedStorage.java:2293)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFrom(OAbstractPaginatedStorage.java:2237)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromFullCheckPoint(OAbstractPaginatedStorage.java:2198)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromCheckPoint(OAbstractPaginatedStorage.java:2187)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreFromWAL(OAbstractPaginatedStorage.java:2138)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.restoreIfNeeded(OAbstractPaginatedStorage.java:1491)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:165)
    ... 11 more

It's not only occuring with an upgrade form an older version it also happens when I just kill the process and so the WAL is used on next startup.

@andrii0lomakin
Copy link
Member

Sorry I do not get it. You killed the server and trying to update db ?

@swimmesberger
Copy link

The initial poster said its happening on an upgrade from 2.0.8 to 2.1-rc2 but I can also reproduce it with a fresh 2.1-rc2 database with some indices. When you forcefully stop the database (e.g. killing the process) the WAL is used on next startup and when it tries to rebuild the indices on that startup the error occured for me.

@andrii0lomakin
Copy link
Member

We support binary compatibility if you do not kill db process but correctly close it.
About first post. @martingg88 Could you provide example of db, so I will try to open it too ?

@martingg88
Copy link
Author

you can download db at this link
https://drive.google.com/file/d/0B4HzIyaEAQ5WTV9CNkliS01CMzQ/view?pli=1

@martingg88
Copy link
Author

any update?

@machak
Copy link

machak commented May 20, 2015

have seen same issue on (2-1.SNAPSHOT).

"We support binary compatibility if you do not kill db process but correctly close it."
so, in case of server crash, data is pretty much corrupted...no?

@martingg88
Copy link
Author

we don't have this issue before 2.1 version.

@andrii0lomakin
Copy link
Member

@machak if you crash server then you should restart it and then close it again. So your data will not be corrupted.

@andrii0lomakin andrii0lomakin modified the milestones: 2.1 Enterprise GA, 2.1 GA May 20, 2015
andrii0lomakin added a commit that referenced this issue May 21, 2015
@andrii0lomakin
Copy link
Member

Fixed, coul dyou try now ?

@swimmesberger
Copy link

With 2.1-rc3 it works now for me :)

@martingg88
Copy link
Author

yes. it work now

@daniellawry
Copy link

May be related... I'm seeing the following trace when querying the graph db using the JAVA API

java.lang.IllegalArgumentException: File with id 0 not found in WOW Cache
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.cacheFileContent(OWOWCache.java:899)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.load(OWOWCache.java:417)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.updateCache(OReadWriteDiskCache.java:676)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.doLoad(OReadWriteDiskCache.java:302)
    at com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.load(OReadWriteDiskCache.java:270)
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.loadPageEntry(OLocalHashTable.java:2085)
    at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.get(OLocalHashTable.java:404)
    at com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine.get(OHashTableIndexEngine.java:155)
    at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:58)
    at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:45)
    at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:59)
    at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
    at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
    at com.orientechnologies.orient.core.sql.operator.OQueryOperatorEquals.executeIndexQuery(OQueryOperatorEquals.java:129)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchForIndexes(OCommandExecutorSQLSelect.java:1525)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:757)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:193)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:440)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:422)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:393)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:64)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:1176)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1165)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
    at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:48)

First occurred in 2.1.2. I tried upgrading to 2.1.7 but the issue remained.

I have done both proper restarts and shutdowns of the orientdb server and have tried to rebuild all indexes but no luck.

Possible regression?

@andrii0lomakin
Copy link
Member

Hi Daniel,
Could you send me your database ?
We had issues with atomic operations management before 2.1.5 in hash index
I think that is your case.
But we have to check .

вт, 8 Дек 2015, 20:18, Daniel Lawry notifications@github.com:

May be related... I'm seeing the following trace when querying the graph
db using the JAVA API

java.lang.IllegalArgumentException: File with id 0 not found in WOW Cache
at
com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.cacheFileContent(OWOWCache.java:899)
at
com.orientechnologies.orient.core.index.hashindex.local.cache.OWOWCache.load(OWOWCache.java:417)
at
com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.updateCache(OReadWriteDiskCache.java:676)
at
com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.doLoad(OReadWriteDiskCache.java:302)
at
com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.load(OReadWriteDiskCache.java:270)
at
com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.loadPageEntry(OLocalHashTable.java:2085)
at
com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.get(OLocalHashTable.java:404)
at
com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine.get(OHashTableIndexEngine.java:155)
at
com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:58)
at
com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:45)
at
com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:59)
at
com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:233)
at
com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:41)
at
com.orientechnologies.orient.core.sql.operator.OQueryOperatorEquals.executeIndexQuery(OQueryOperatorEquals.java:129)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchForIndexes(OCommandExecutorSQLSelect.java:1525)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:757)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:193)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:440)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:422)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:393)
at
com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:64)
at
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:1176)
at
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1165)
at
com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
at
com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:48)

First occurred in 2.1.2. I tried upgrading to 2.1.7 but the issue remained.

I have done both proper restarts and shutdowns of the orientdb server and
have tried to rebuild all indexes but no luck.

Possible regression?


Reply to this email directly or view it on GitHub
#4089 (comment)
.

Best regards,
Andrey Lomakin, R&D lead.
OrientDB Ltd

twitter:@Andrey_Lomakin linkedin:https://ua.linkedin.com/in/andreylomakin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

6 participants