orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Concurrent indexing fails when the DB is encrypted at rest

Open ErikShiken opened this issue 8 years ago • 1 comments

OrientDB Version: 2.2.29

Java Version: 1.8.0_161

OS: Windows 10

Expected behavior

I expect to do a concurrent index when the DB is encrypted at rest.

Actual behavior

When I attempt to index the DB, I get a lot of errors like this: ARNING [09:28:11 02-Apr-18 EDT][com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary] $ANSI{green {db=systemDb}} Error deserializing record with id #9:0 send this data for debugging: QfFN5B5DdH6DCF54BQo6IV8zYWlkAAABJwcebl8zYWRpc3BsYXlOYW1lAAABYQcUZ2VvXzNhY2l0eQAAAXIHHGdlb18zYWJ1aWxkaW5nAAABewcWbl8zYXN0YXRpb24AAAGIBxBuXzNhdHlwZQAAAZUHFmdlb18zYXN0YXRlAAABrgcgbl8zYW9yZEluU2Vzc2lvbgAAAbcHEG5fM2FuYW1lAAAB8QcYbl8zYXNjaGVkdWxlAAACAgAQVGFnVHlwZXMAAAIDBxhDYXRlZ29yeU1hc2sAAAILBxppbl9zY29wZWRFZGdlAAACDRYAcm5zcGFjZTpzdGF0aW9uXzQ2NTh8c2xvdDovU2NoZWR1bGVGb2xkZXIvVHJpZ2dlclNjaGVkdWxlNHJuc3BhY2U6c3RhdGlvbl80NjU4fHNsb3Q6L1NjaGVkdWxlRm9sZGVyL1RyaWdnZXJTY2hlZHVsZTQgVHJpZ2dlclNjaGVkdWxlNBBSaWNobW9uZBhzdGF0aW9uXzQ2NTgYc3RhdGlvbl80NjU4MHNjaGVkdWxlOlRyaWdnZXJTY2hlZHVsZRBWaXJnaW5pYXJuc3BhY2U6c3RhdGlvbl80NjU4fHNsb3Q6L1NjaGVkdWxlRm9sZGVyL1RyaWdnZXJTY2hlZHVsZTQgVHJpZ2dlclNjaGVkdWxlNAEOaHM6aWQ9bwIxAQAAAAEACQAAAAAAAAGE SEVERE [09:28:11 02-Apr-18 EDT][com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage] $ANSI{green {db=systemDb}} Exception 59ED03EC in storage systemDb com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from V WHERE n_3astation IN ["station_4681"] DB name="systemDb" at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3361) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3278) at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78) at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74) at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33) at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex$2.call(OCommandExecutorSQLDeleteVertex.java:215) at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex$2.call(OCommandExecutorSQLDeleteVertex.java:208) at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInTx(OGraphCommandExecutorSQLFactory.java:172) at com.orientechnologies.orient.graph.sql.OGraphCommandExecutorSQLFactory.runInConfiguredTxMode(OGraphCommandExecutorSQLFactory.java:257) at com.orientechnologies.orient.graph.sql.OCommandExecutorSQLDeleteVertex.execute(OCommandExecutorSQLDeleteVertex.java:208) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3340) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3278) at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69) at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(OrientGraphCommand.java:49) at executeQuery(OrientSystemDbConnection.java:502)

Steps to reproduce

Attempt to index the DB with AES encryption turned on. It appears that AES encryption may not be thread safe. Perhaps OAESEncryption#encryptOrDecrypt should be synchronized?

ErikShiken avatar Apr 09 '18 12:04 ErikShiken

Hi @ErikShiken,

Yes you are right, this is going to be fixed in 2.2.34.

Regards

tglman avatar Apr 11 '18 14:04 tglman