Skip to content

Conversation

@mdianjun
Copy link

@mdianjun mdianjun commented May 21, 2025

When merging nodes or edges concurrently, there is label with the same name created by different session.
However, checking whether the label exists cannot be guaranteed consistency. This commit add an advisory lock
to ensure creating label is serial.

@mdianjun
Copy link
Author

@MuhammadTahaNaveed PTAL, thanks.

@mdianjun mdianjun force-pushed the fix_concurrent_create_label branch from 0ef0e7c to 7f9edf8 Compare May 21, 2025 09:52
@mdianjun mdianjun force-pushed the fix_concurrent_create_label branch from 7f9edf8 to 0319625 Compare May 27, 2025 07:39
@mdianjun mdianjun changed the title Set if_not_exists to true in case of merging nodes/edges Add advisory lock before creating label in merge operation May 27, 2025
@jrgemignani
Copy link
Contributor

@MuhammadTahaNaveed Can you check if this is a new CI issue?

@jrgemignani
Copy link
Contributor

@mdianjun Can you rebase (against the master) and force push this PR? We had to fix the CI that was causing build issues.

@mdianjun mdianjun force-pushed the fix_concurrent_create_label branch from 0319625 to cfab37d Compare June 3, 2025 07:09
@mdianjun
Copy link
Author

mdianjun commented Jun 3, 2025

@mdianjun Can you rebase (against the master) and force push this PR? We had to fix the CI that was causing build issues.

Have rebased it.

@jrgemignani
Copy link
Contributor

jrgemignani commented Jun 3, 2025

When merging nodes or edges concurrently, there is label with the same name created by different session. However, checking whether the label exists cannot be guaranteed consistency. This commit add an advisory lock to ensure creating label is serial.

@mdianjun As this fixes a purported issue, can you provide an example showing this issue? Additionally, can you provide regression tests for it?

edit: Why only merge and not create?

@mdianjun mdianjun force-pushed the fix_concurrent_create_label branch from cfab37d to 76895cc Compare June 4, 2025 03:09
@mdianjun mdianjun changed the title Add advisory lock before creating label in merge operation Add advisory lock before creating label in create/merge operation Jun 4, 2025
@mdianjun
Copy link
Author

mdianjun commented Jun 4, 2025

@mdianjun As this fixes a purported issue, can you provide an example showing this issue? Additionally, can you provide regression tests for it?

edit: Why only merge and not create?

@jrgemignani Create operation should be fixed as well, I missed it. I add a python script in regress test.

@mdianjun mdianjun force-pushed the fix_concurrent_create_label branch from f9fef54 to 9d2d11b Compare June 4, 2025 03:29
@jrgemignani
Copy link
Contributor

@MuhammadTahaNaveed Is this something we need to add/fix? Or,...

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants