Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[transactions] Prevent NullPointerException due to Recycled object used in different threads #1919

Closed

Conversation

yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Jun 25, 2023

Motivation

Cherry pick changes in datastax/starlight-for-kafka@e85e4c2

Modifications

  • Prevent NullPointerException due to Recycled object used in different threads by make it volatile

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Yiming Zang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

@yzang2019:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Jun 25, 2023
@github-actions
Copy link

@yzang2019:Thanks for providing doc info!

@github-actions github-actions bot added no-need-doc This pr does not need any document and removed doc-info-missing This pr needs to mark a document option in description labels Jun 25, 2023
@github-actions
Copy link

@yzang2019:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added doc-info-missing This pr needs to mark a document option in description and removed no-need-doc This pr does not need any document doc-info-missing This pr needs to mark a document option in description labels Jun 25, 2023
@github-actions
Copy link

@yzang2019:Thanks for providing doc info!

@github-actions github-actions bot added the no-need-doc This pr does not need any document label Jun 25, 2023
context.startSendOperationForThrottling = startSendOperationForThrottling;
context.completeSendOperationForThrottling = completeSendOperationForThrottling;
context.pendingTopicFuturesMap = pendingTopicFuturesMap;
context.topicManager = topicManager;
context.ctx = ctx;

return context;
}

public void recycle() {
Copy link
Member

Choose a reason for hiding this comment

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

I think they are removed recycle method in this commit: datastax/starlight-for-kafka@0b6fd77

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 call, then it's probably not needed any more

@yzang2019 yzang2019 closed this Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no-need-doc This pr does not need any document
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants