Skip to content

java.nio.BufferUnderflowException when deleting a particular edge type ( edge name Has) #952

Description

@allegrojm

ArcadeDB Version: v23.3.1-SNAPSHOT (build 70014fd/1677728103843/main

JDK Version: OpenJDK 64-Bit Server VM (Red_Hat-11.0.17.0.8-2.el7_9)

OS: Linux 3.10.0-1160.62.1.el7.x86_64

Expected behavior

All Has edges should be deleted

Actual behavior

Error on command execution (PostCommandHandler)
java.nio.BufferUnderflowException
at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:643)
at java.base/java.nio.HeapByteBuffer.get(HeapByteBuffer.java:165)
at com.arcadedb.database.Binary.getByte(Binary.java:318)
at com.arcadedb.database.Binary.getUnsignedNumber(Binary.java:353)
at com.arcadedb.database.Binary.getNumber(Binary.java:340)
at com.arcadedb.serializer.BinarySerializer.deserializeValue(BinarySerializer.java:547)
at com.arcadedb.graph.ImmutableEdge.checkForLazyLoading(ImmutableEdge.java:159)
at com.arcadedb.graph.ImmutableEdge.getVertex(ImmutableEdge.java:108)
at com.arcadedb.query.sql.function.graph.SQLFunctionMove.e2v(SQLFunctionMove.java:84)
at com.arcadedb.query.sql.function.graph.SQLFunctionOutV.move(SQLFunctionOutV.java:37)
at com.arcadedb.query.sql.function.graph.SQLFunctionMove.lambda$execute$1(SQLFunctionMove.java:57)
at com.arcadedb.query.sql.SQLQueryEngine.foreachRecord(SQLQueryEngine.java:144)
at com.arcadedb.query.sql.function.graph.SQLFunctionMove.execute(SQLFunctionMove.java:57)
at com.arcadedb.query.sql.parser.FunctionCall.execute(FunctionCall.java:126)
at com.arcadedb.query.sql.parser.FunctionCall.execute(FunctionCall.java:84)
at com.arcadedb.query.sql.parser.LevelZeroIdentifier.execute(LevelZeroIdentifier.java:65)
at com.arcadedb.query.sql.parser.BaseIdentifier.execute(BaseIdentifier.java:66)
at com.arcadedb.query.sql.parser.BaseExpression.execute(BaseExpression.java:138)
at com.arcadedb.query.sql.parser.Expression.execute(Expression.java:87)
at com.arcadedb.query.sql.parser.BinaryCondition.evaluate(BinaryCondition.java:47)
at com.arcadedb.query.sql.parser.NotBlock.evaluate(NotBlock.java:56)
at com.arcadedb.query.sql.parser.AndBlock.evaluate(AndBlock.java:70)
at com.arcadedb.query.sql.parser.OrBlock.evaluate(OrBlock.java:58)
at com.arcadedb.query.sql.parser.WhereClause.matchesFilters(WhereClause.java:56)
at com.arcadedb.query.sql.executor.FilterStep$1.fetchNextItem(FilterStep.java:72)
at com.arcadedb.query.sql.executor.FilterStep$1.hasNext(FilterStep.java:91)
at com.arcadedb.query.sql.executor.SubQueryStep$1.hasNext(SubQueryStep.java:51)
at com.arcadedb.query.sql.executor.CastToStepAbstract$1.hasNext(CastToStepAbstract.java:45)
at com.arcadedb.query.sql.executor.DeleteStep$1.hasNext(DeleteStep.java:40)
at com.arcadedb.query.sql.executor.CountStep.syncPull(CountStep.java:52)
at com.arcadedb.query.sql.executor.SelectExecutionPlan.fetchNext(SelectExecutionPlan.java:44)
at com.arcadedb.query.sql.executor.UpdateExecutionPlan.executeInternal(UpdateExecutionPlan.java:62)
at com.arcadedb.query.sql.executor.ScriptLineStep.syncPull(ScriptLineStep.java:49)
at com.arcadedb.query.sql.executor.ScriptExecutionPlan.doExecute(ScriptExecutionPlan.java:95)
at com.arcadedb.query.sql.executor.ScriptExecutionPlan.fetchNext(ScriptExecutionPlan.java:59)
at com.arcadedb.query.sql.parser.LocalResultSet.fetchNext(LocalResultSet.java:45)
at com.arcadedb.query.sql.parser.LocalResultSet.(LocalResultSet.java:39)
at com.arcadedb.query.sql.SQLScriptQueryEngine.executeInternal(SQLScriptQueryEngine.java:198)
at com.arcadedb.query.sql.SQLScriptQueryEngine.command(SQLScriptQueryEngine.java:106)
at com.arcadedb.database.EmbeddedDatabase.command(EmbeddedDatabase.java:1236)
at com.arcadedb.server.ha.ReplicatedDatabase.command(ReplicatedDatabase.java:593)
at com.arcadedb.server.ServerDatabase.command(ServerDatabase.java:416)
at com.arcadedb.server.http.handler.PostCommandHandler.executeScript(PostCommandHandler.java:118)
at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:87)
at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:92)
at com.arcadedb.server.http.handler.AbstractHandler.handleRequest(AbstractHandler.java:128)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
at java.base/java.lang.Thread.run(Thread.java:829)

Steps to reproduce

DELETE edge Has where outV().id = "some vertex id"; // THIS causes the issue

DELETE edge Has where type = 'Establishment_Country' and outV().id = "ef2fd736-b230-4dc2-88e3-f5df3c63fff2"; // THIS doesn't cause an issue

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions