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

[close #489 ] fix backoffer data race #490

Merged
merged 7 commits into from
Jan 21, 2022

Conversation

iosmanthus
Copy link
Member

Signed-off-by: iosmanthus myosmanthustree@gmail.com

What problem does this PR solve?

Issue Number: close #489

ConcreteBackOffer may trigger by multiple threads but the backOffFunctionMap is HashMap which is not thread-safe. This might trigger a race exception while this backoffer is shared between threads.

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
iosmanthus and others added 4 commits January 20, 2022 21:37
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Copy link
Collaborator

@marsishandsome marsishandsome left a comment

Choose a reason for hiding this comment

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

LGTM

@marsishandsome
Copy link
Collaborator

/run-all-tests

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@marsishandsome marsishandsome merged commit a7e0e74 into tikv:master Jan 21, 2022
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Jan 21, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.1 in PR #494

marsishandsome pushed a commit that referenced this pull request Jan 21, 2022
* cherry pick #490 to release-3.1

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix license error

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

Co-authored-by: iosmanthus <dengliming@pingcap.com>
Co-authored-by: iosmanthus <myosmanthustree@gmail.com>
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.

HashMap throw a ConcurrentModificationException
4 participants