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

Improve use of MDC #721

Merged
merged 5 commits into from
Aug 5, 2018
Merged

Improve use of MDC #721

merged 5 commits into from
Aug 5, 2018

Conversation

MinnDevelopment
Copy link
Member

Pull Request Etiquette

There are several guidelines you should follow in order for your
Pull Request to be merged.

It is sometimes better to include more changes in a single commit.
If you find yourself having an overwhelming amount of commits, you
can rebase your branch.

Description

Now we use copies of the initial map in order to restore thread locality
for MDC, in addition we now set MDC keys in the onThreadStart methods
for websocket adapters

Now we use copies of the initial map in order to restore thread locality
for MDC, in addition we now set MDC keys in the onThreadStart methods
for websocket adapters
@MinnDevelopment

This comment has been minimized.

@MinnDevelopment MinnDevelopment added the status: freezer this is currently put on hold label Jul 21, 2018
Copy link
Collaborator

@kantenkugel kantenkugel left a comment

Choose a reason for hiding this comment

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

I also don't fully understand what most calls to setContextMap() do... I assume MDC is thread-specific?

{
return channel.getJDA();
return (JDAImpl) channel.getJDA();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't this be replaced with just return api;? (see line 91)

Copy link
Member Author

Choose a reason for hiding this comment

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

No it can't be replaced with that, the api reference is local in the constructor.

@MinnDevelopment MinnDevelopment removed the status: freezer this is currently put on hold label Jul 21, 2018
@MinnDevelopment MinnDevelopment changed the title Improve use of MDC in JDA Improve use of MDC Jul 21, 2018
@MinnDevelopment MinnDevelopment added the status: completed has been completed but is not yet released label Jul 24, 2018
# Conflicts:
#	src/main/java/net/dv8tion/jda/core/requests/RateLimiter.java
#	src/main/java/net/dv8tion/jda/core/requests/Requester.java
@MinnDevelopment MinnDevelopment merged commit b29cc5c into development Aug 5, 2018
@MinnDevelopment MinnDevelopment deleted the patch-mdc branch August 5, 2018 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: completed has been completed but is not yet released type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants