-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix/create variable map #4822
Fix/create variable map #4822
Conversation
Feature: Test MT-safe varaibles | ||
|
||
Scenario: Binary plan of minus | ||
# It's not stable to reproduce the bug, so we run it 100 times |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what's the real reason about the crash? not thread-safe data structure usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, all variable should insert to map in building stage, and executor is running on MT-environment, so executor insert new variable will lead to condition race.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which line of code inserts new variabes to map in runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.setVar(innerVar_, v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.setVar(innerVar_, v);
Does it leads the query YIELD 1 AS number MINUS YIELD 2 AS number
to crash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nebula/src/graph/validator/YieldValidator.cpp
Line 187 in 4191724
inputVar = vctx_->anonVarGen()->getVar(); |
Anything related to vesoft-inc/nebula-ent#1576 ? |
|
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Close https://github.com/vesoft-inc/nebula-ent/issues/1539
Description:
The MT-safe of variable map is guaranteed by pre inserted before runtime, so I force to insert variable to map when symbol table create new variable.
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: