-
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 concurrent bug about session count #5496
Conversation
94d1221
to
1ea3112
Compare
src/common/session/SessionManager.h
Outdated
auto count = countFindPtr->fetch_sub(1); | ||
if (count <= 0) { |
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.
fetch_sub
subtracts from the counter and returns the previous value. So the counter shall never be less than or equal to 0.
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.
Good Catch! Fixed.
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.
LGTM.
* refactor traverse output (#5464) * refactor traverse output * fix pruneproperties error & none_direct_dst * fix test error * fix shortest path * Change the compaction filter logic to let periodic compaction go through custom compaction filter, to gc expired data (#5447) * Push filter down cross join (#5473) * fix comment * push down filter through cross join --------- Co-authored-by: Sophie <[email protected]> * Fix shortest path crash (#5472) * fix crash of geo (#5475) * fix crash of geo * change log(fatal) to log(error) * fix miss arg $GITHUB_OUTPUT (#5478) * Split optimizer rules (#5470) Fix compile small rename Fix tck Fix tck fmt Fix tck Fix tck * Enhancement/optimize edge all predicate (#5481) * fix eval contains filter on storaged (#5485) * fix eval contains filter on storaged * add tck case * add tck case * fix tck * fix lint * fix lint * Fix expression util function (#5487) fmt Co-authored-by: Sophie <[email protected]> * fix ContainsFilter random fail (#5489) * Fixed graphd startup issue (#5493) * fix prunproperties (#5494) * stop the pushing down of not expressions that are not rewritten to proper forms. (#5502) * Fix edge all predicate with rank function (#5503) Co-authored-by: Sophie <[email protected]> * rewrite param in subgraph & path (#5500) * check param in subgraph * rewrite param in path --------- Co-authored-by: Sophie <[email protected]> * Fix concurrent bug about session count (#5496) * Fix regex expression (#5507) * Update requirements.txt (#5512) Solidified tomli version to solve centos7 compatibility issues * Update cluster id (#5514) --------- Co-authored-by: jimingquan <[email protected]> Co-authored-by: Ryan <[email protected]> Co-authored-by: Yee <[email protected]> Co-authored-by: jie.wang <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: kyle.cao <[email protected]> Co-authored-by: codesigner <[email protected]> Co-authored-by: dutor <[email protected]> Co-authored-by: Cheng Xuntao <[email protected]> Co-authored-by: Yichen Wang <[email protected]>
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:
now
addSessionCount
andsubSesssionCount
couldn't count the number of sessions correctly when multiple threads operate the same session key.Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: