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

.size() function gives wrong value #9769

Open
adriancoca opened this issue Mar 1, 2022 · 4 comments
Open

.size() function gives wrong value #9769

adriancoca opened this issue Mar 1, 2022 · 4 comments
Milestone

Comments

@adriancoca
Copy link

OrientDB Version: 3.2.5

Java Version: 8

OS: Windows server 2019

Decided to upgrade orient from 3.0.29 to 3.2.5.
It seems that in new version the size() function give a wrong answer.

I don't know if it is a fail import with some corupted data, ai tried repair database but no problem found, also maybe libked with -> #9767

Expected behavior

image

Actual behavior

image

@tglman tglman added this to the 3.2.x milestone Mar 7, 2022
@tglman
Copy link
Member

tglman commented Mar 8, 2022

Hi,

This is probably due to a broken graph link, that means on the source record may be there a id of a record that do not exists any more, so when you traverse the relationship this get excluded, this is why you see the record id in the first query, but it result on 0 size when you traverse it.

Bye

@tglman tglman modified the milestones: 3.2.x, 3.2.7 Jun 9, 2022
@adriancoca adriancoca reopened this Sep 27, 2023
@adriancoca
Copy link
Author

One week ago i runned repair database and today i have again broken record.

Orient version 3.2.22

Is there a way to prevent or easy repair without database stopped ?

image

@tglman
Copy link
Member

tglman commented Sep 28, 2023

Hi,

yes for this kind of problems you could try to remove the link manually, here an example query for your case:

update #ID_I_DO_NOT_KNOW remove in_SUBORDER_OF = #26:46

the name of the field follow the convention in_relationship_name and out_relashionship_name

I''m not sure how you can produce this problem in the first place, I would say you do not have any delete .... unsafe and truncate record ... this two commands could produce this kind of errors.

Regards

@adriancoca
Copy link
Author

adriancoca commented Oct 11, 2023

Hi again,
It doesn't seem to remove that wrong item using what you said above also i am not using unsafe of truncate on that node.
image

LE: this works -> update #26:29 remove in_SUBORDER_OF

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