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

Fix concurrent bug about session count #5496

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

yixinglu
Copy link
Contributor

What type of PR is this?

  • bug
  • feature
  • enhancement

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 and subSesssionCount couldn't count the number of sessions correctly when multiple threads operate the same session key.

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@yixinglu yixinglu added the ready-for-testing PR: ready for the CI test label Apr 13, 2023
@yixinglu yixinglu force-pushed the fix-sess-mgr branch 2 times, most recently from 94d1221 to 1ea3112 Compare April 13, 2023 14:21
@yixinglu yixinglu marked this pull request as ready for review April 17, 2023 03:43
Aiee
Aiee previously approved these changes Apr 17, 2023
Comment on lines 105 to 106
auto count = countFindPtr->fetch_sub(1);
if (count <= 0) {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Catch! Fixed.

Copy link
Contributor

@dutor dutor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@dutor dutor merged commit f07c3c1 into vesoft-inc:master Apr 17, 2023
@yixinglu yixinglu deleted the fix-sess-mgr branch April 17, 2023 09:35
dutor added a commit that referenced this pull request Apr 20, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants