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

Possible bug: Missing version null check in ODeleteRecordDistributedTask #1338

Closed
lbakman opened this issue Feb 8, 2013 · 1 comment
Closed
Assignees
Milestone

Comments

@lbakman
Copy link

lbakman commented Feb 8, 2013

Hi

(Edited: This was found in orientdb-master taken from GitHub this morning - 08/02-2013)

I have been looking at OrientDB for a few days as we are looking for a distributed database for backing our application.

On paper OrientDB has looked as a very good match for our system, but I have had a lot of problems getting distribution/clustering to work properly - more specifically I kept receiving exceptions when trying to delete records from a cluster (related to ODeleteRecordDistributedTask as shown below).

I compared ODeleteRecordDistributedTask with OCreateRecordDistributedTask and found a difference in writeExternal and readExternal: The former does not check "version" for null whereas the latter does. I added the "version" null check to ODeleteRecordDistributedTask which solved my problem.

if(version == null)
    version = OVersionFactory.instance().createUntrackedVersion();

Is there a bug in ODeleteRecordDistributedTask with the missing null check?

Regards Lau bakman

The received exception and stack trace:

2013-02-08 08:36:21:899 WARN DISTRIBUTED -> routing operation RECORD_DELETE in SYNCHRONOUS mode against :2435/mydb... [OHazelcastPlugin]DISTRIBUTED -> error on execution of operation in SYNCHRONOUS mode against node :2435
com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 1
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem when serializing type 1
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem reading Externalizable class : com.orientechnologies.orient.server.task.ODeleteRecordDistributedTask, exception: java.lang.NullPointerException
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)DISTRIBUTED -> error on execution of operation in SYNCHRONOUS mode against node :2435
com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 1
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem when serializing type 1
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem reading Externalizable class : com.orientechnologies.orient.server.task.ODeleteRecordDistributedTask, exception: java.lang.NullPointerException
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOperation(OHazelcastPlugin.java:708)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:290)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)Cannot route DELETE_RECORD operation against #11:0 to the distributed node
error on execution of operation in SYNCHRONOUS mode against node :2435
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:342)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 1
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:342)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem when serializing type 1
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:342)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
Problem reading Externalizable class : com.orientechnologies.orient.server.task.ODeleteRecordDistributedTask, exception: java.lang.NullPointerException
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:342)
-> com.orientechnologies.orient.server.distributed.ODistributedStorage.deleteRecord(ODistributedStorage.java:202)
-> com.orientechnologies.orient.core.db.raw.ODatabaseRaw.delete(ODatabaseRaw.java:309)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeDeleteRecord(ODatabaseRecordAbstract.java:857)
-> com.orientechnologies.orient.core.tx.OTransactionNoTx.deleteRecord(OTransactionNoTx.java:114)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:251)
-> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.delete(ODatabaseRecordTx.java:36)
-> com.orientechnologies.orient.core.record.ORecordAbstract.delete(ORecordAbstract.java:317)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.executeDocument(OServerCommandPostStudio.java:277)
-> com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostStudio.execute(OServerCommandPostStudio.java:85)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:133)
-> com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:462)
-> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:43)
2013-02-08 08:36:21:934 SEVE Internal server error:
com.orientechnologies.orient.core.exception.OStorageException: Cannot route DELETE_RECORD operation against #11:0 to the distributed node
--> java.util.concurrent.ExecutionException: error on execution of operation in SYNCHRONOUS mode against node :2435
--> java.util.concurrent.ExecutionException: com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 1
--> com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 1
--> java.io.IOException: Problem reading Externalizable class : com.orientechnologies.orient.server.task.ODeleteRecordDistributedTask, exception: java.lang.NullPointerException [ONetworkProtocolHttpDb]

@ghost ghost assigned lvca Feb 8, 2013
@lvca
Copy link
Member

lvca commented Feb 8, 2013

Fixed in 3b52d81. Thanks!

@lvca lvca closed this as completed Feb 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants