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

Performance issue with Orient 3.x when removing non lightweight edges #9821

Closed
jacquipre opened this issue Jun 7, 2022 · 1 comment
Closed
Labels
Milestone

Comments

@jacquipre
Copy link

OrientDB Version: 3.2.6

Java Version: 1.8.0_322-b06 Temurin

OS: Windows 10 Enterprise

Expected behavior

Removing non lightweight edges is not slower than in OrientDB 2.x

Actual behavior

Hi!
We are updating OrientDB from version 2.2.37 to 3.2.6 and detected some performance issues with removing edges.
We have some not lightweighted edges which should be removed. This takes now 40% more time than before.

With some research and debugging we found out, that the reason for that is this code change that was made for OrientDB 3.0.0. Unfortunately, we cannot see why this change was made (no issue linked).
In this commit, outcoming and incoming vertices were detached when removing an edge, which at first sounds correct.

We made a profiling where you can see that the OEdgeDelegate.deleteLinks method takes over 60% of the time, see

removeEdge_00

While debugging we saw, that this method is called twice for each edge:

  1. com.tinkerpop.blueprints.impls.orient.OrientGraph.removeEdgeInternal(OrientEdge) --> line 438 calls edge.removeRecord()
  2. this calls com.orientechnologies.orient.core.record.impl.OEdgeDocument.delete()

removeEdge_03

This deletes the links first (no 1) and delegates to the super.delete() (no 2) which finally leads to com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.delete(ORecord) which also deletes the links in line 1030 if the document is an edge

removeEdge_04

Is this expected?

Steps to reproduce

remove a non-lightweight edge

@tglman tglman added this to the 3.2.x milestone Jun 14, 2022
@tglman tglman added the bug label Dec 23, 2022
@tglman tglman modified the milestones: 3.2.x, 3.2.14 Dec 23, 2022
@tglman
Copy link
Member

tglman commented Dec 23, 2022

Hi,

This should be fixed in the last release 3.2.14.

Closing

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

No branches or pull requests

2 participants