orientechnologies/orientdb

`OrientDB.RequestError: null` when deleting edges

Opened this issue · 2 comments

OrientDB Version: 3.2.30

Java Version: running in official docker image

OS: running in official docker image

Expected behavior

Trying to delete record with SQL: DELETE EDGE EDGE_NAME TO (SELECT FROM ENTITY_NAME WHERE entityId=:entityId AND integrationId=:integrationId AND type=:type)

And OrientDB deletes it, but when Im trying to run this query again he throws error

I also have index: (entityId, integrationId, type)
entityId: string
integrationId: string
type: int

lightweightEdges enabled

UPD: works well without lightweight edges

java.lang.NullPointerException
        at java.util.Objects.requireNonNull(Objects.java:203)
        at java.util.Optional.<init>(Optional.java:96)
        at java.util.Optional.of(Optional.java:108)
        at com.orientechnologies.orient.core.sql.executor.OResultInternal.getIdentity(OResultInternal.java:330)
        at com.orientechnologies.orient.core.sql.executor.DeleteStep.mapResult(DeleteStep.java:30)
        at com.orientechnologies.orient.core.sql.executor.DeleteStep.lambda$syncPull$0(DeleteStep.java:24)
        at com.orientechnologies.orient.core.sql.executor.resultset.OResultSetMapper.next(OResultSetMapper.java:28)
        at com.orientechnologies.orient.core.sql.executor.CountStep.syncPull(CountStep.java:52)
        at com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan.fetchNext(OSelectExecutionPlan.java:35)
        at com.orientechnologies.orient.core.sql.executor.OUpdateExecutionPlan.executeInternal(OUpdateExecutionPlan.java:41)
        at com.orientechnologies.orient.core.sql.parser.ODeleteEdgeStatement.execute(ODeleteEdgeStatement.java:58)
        at com.orientechnologies.orient.core.sql.parser.ODeleteEdgeStatement.execute(ODeleteEdgeStatement.java:71)
        at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:76)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:633)
        at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:221)
        at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:104)
        at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:34)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:242)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:800)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:68)

Step to reproduce

  1. try to run sql query above
  2. create verticle1 with 3 fields
  3. create verticle2 with 3 fields
  4. create edge between them
  5. try to delete with sql query above

Hi,

Thanks to report this, yes this is probably depending on lightweight edges, because they do not have an ID I will try to fix the case.

Hi,

This should be fixed in 3.2.33, could you double check it.

Regards