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

Gremlin Error: "Record Not Found" after dropped a vertex. Simple reproducible example. #1328

Closed
JoJ123 opened this issue Nov 16, 2023 · 4 comments
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@JoJ123
Copy link

JoJ123 commented Nov 16, 2023

ArcadeDB Version:

ArcadeDB Server v23.10.1-SNAPSHOT (build 186c0adb0743a94a733a512d31a17901d174f3bb/1695791343005/main)
From Docker Image

OS and JDK Version:

Running on Linux 5.10.102.1-microsoft-standard-WSL2 - OpenJDK 64-Bit Server VM 11.0.20.1 (Temurin-11.0.20.1+1)

Expected behavior

Query remaining vertexes possible after dropped another vertext

Actual behavior

Getting an Error: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Record #13:0 not found
My first analysis is, that it's happening if you drop a vertex that is having more than one incoming edge.

Steps to reproduce

Run the following gremlin query (Copy & Paste). I use gdotv for fast testing.

g.addV("RG").
  property("name", "r1").
  addV("RG").
  property("name", "r2").as("member2").
  V().
  has("name", "r1").
  addE(":TEST").to("member2").
  addV("RG").
  property("name", "r3").as("member3").
  V().
  has("name", "r1").
  addE(":TEST").to("member3").
  addV("RG").
  property("name", "r4").as("member4").
  V().
  has("name", "r2").
  addE(":TEST").to("member4").
  addV("RG").
  property("name", "r5").as("member5").
  V().
  has("name", "r3").
  addE(":TEST").to("member5").
  V().
  has("name", "r4").
  addE(":TEST").to("member5").
  addV("P").
  property("name", "p1").as("member6").
  V().
  has("name", "r5").
  addE(":TEST").from("member6")

You will have the following graph:
image

Execute the following gremlin query to remove r4 from r5 and all incoming vertexes with the label P:

g.V().
  has("RG", "name", "r4").
  out().
  has("RG", "name", "r5").
  as('deleteEntry').
  select('deleteEntry').
  sideEffect(in().hasLabel("P").drop()).
  sideEffect(select('deleteEntry').drop()).
  constant('deleted');

The drop itself will execute without an error. But afterwards you are not able anymore to query the database:
Getting an Error: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Record #13:0 not found

Second Issue (which is linked)

The above delete query is not working if you remove the select part of the query. Maybe this is related to gremlin not sure, but I wanted to add that here.

  select('deleteEntry').
@JoJ123 JoJ123 changed the title Gremlin Error: "Record Not Found" after dropped a vertex. Small reproducible example. Gremlin Error: "Record Not Found" after dropped a vertex. Simple reproducible example. Nov 16, 2023
@lvca
Copy link
Contributor

lvca commented Nov 16, 2023

Thanks @JoJ123 for your detailed report. I'm unable to reproduce your issue. I executed both gremlin queries and after the drop this is what I got (on studio):

image

And I don't see any error in the console. Do you have a particular query you're executing that returns the error?

@lvca lvca self-assigned this Nov 16, 2023
@lvca lvca added unable to reproduce waiting for user in progress The team is actively working on this issue labels Nov 16, 2023
@lvca lvca added this to the 23.11.1 milestone Nov 16, 2023
@JoJ123
Copy link
Author

JoJ123 commented Nov 17, 2023

Hi @lvca,
I tried it also inside the Studio and it's running fine.

Anyway using a UI Tool like gdotv or even the gremlin Node.JS Client the issue is still happening for me.

This is the error log when I'm execution g.V() after the drop, there is not error at all for the drop:
image

The error is saying record not found and the id of this record is r5 the one the was dropped in the previous call.

If I split the query into two queries instead of two .sideEffect it's also working fine. Maybe it's related to this?

@lvca
Copy link
Contributor

lvca commented Nov 18, 2023

It's like the vertex was deleted but not the connected edges. I'm going to try with that piece of code using remote gremlin client instead of studio (that execute the whole code server side).

@lvca lvca modified the milestones: 23.11.1, 23.12.1 Nov 30, 2023
@lvca lvca removed the in progress The team is actively working on this issue label Dec 12, 2023
@lvca lvca modified the milestones: 23.12.1, 24.1.1 Jan 3, 2024
@lvca lvca modified the milestones: 24.1.1, 24.2.1 Feb 5, 2024
@lvca lvca modified the milestones: 24.2.1, 24.3.1 Mar 12, 2024
@lvca lvca modified the milestones: 24.4.1, 24.5.1 Apr 20, 2024
@lvca
Copy link
Contributor

lvca commented May 24, 2024

This issue has been fixed in the latest release.

@lvca lvca closed this as completed May 24, 2024
@lvca lvca added bug Something isn't working fixed and removed unable to reproduce waiting for user labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants