Skip to content

Conversation

@rickyma
Copy link
Contributor

@rickyma rickyma commented Jan 10, 2024

What changes were proposed in this pull request?

Fix PR #1363.
NettyDirectMemoryTracker will not be started currently.

Why are the changes needed?

It's a followup PR for #1363.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing UTs.

@rickyma
Copy link
Contributor Author

rickyma commented Jan 10, 2024

PTAL @jerqi @zuston @lifeSo

@jerqi jerqi requested a review from lifeSo January 10, 2024 15:53
@jerqi
Copy link
Contributor

jerqi commented Jan 11, 2024

@lifeSo Could you help review this pr?

@zuston
Copy link
Member

zuston commented Jan 12, 2024

@lifeSo Could you help review this pr?

ping @lifeSo

@lifeSo
Copy link
Collaborator

lifeSo commented Jan 12, 2024

@lifeSo Could you help review this pr?

ping @lifeSo

I reviewed yesterday, I try another way.

image

@jerqi
Copy link
Contributor

jerqi commented Jan 12, 2024

@lifeSo Could you help review this pr?

ping @lifeSo

I reviewed yesterday, I try another way.

image

You should submit the review information, otherwise others can't see it.

@lifeSo
Copy link
Collaborator

lifeSo commented Jan 12, 2024

@lifeSo Could you help review this pr?

ping @lifeSo

OK, I reviewed yesterday as screenshot above. but I do not I should submit.
I re-reviewed and submitted comment.

@lifeSo
Copy link
Collaborator

lifeSo commented Jan 12, 2024

@rickyma

All is ok, but could add unit test case to test the tracker ?

@lifeSo
Copy link
Collaborator

lifeSo commented Jan 12, 2024

@rickyma

What is the difference between the two PlatformDependent?
Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'

Copy link
Collaborator

@lifeSo lifeSo left a comment

Choose a reason for hiding this comment

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

What is the difference between the two PlatformDependent?
Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'

@rickyma

import java.util.concurrent.TimeUnit;

import io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.PlatformDependent;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between the two PlatformDependent?
Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between the two PlatformDependent?
Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'

@rickyma

initMetricsReporter();

registerHeartBeat.startHeartBeat();
directMemoryUsageReporter.start();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could add test unit case to test the funcation of directMemoryUsageReporter?
Or I could try later.

initMetricsReporter();

registerHeartBeat.startHeartBeat();
directMemoryUsageReporter.start();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could add test unit case to test the funcation of directMemoryUsageReporter?
Or I could try later.
@rickyma

Copy link
Collaborator

@lifeSo lifeSo left a comment

Choose a reason for hiding this comment

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

Could add test unit case to test the funcation of directMemoryUsageReporter?
Or I could try later.

@rickyma

@rickyma
Copy link
Contributor Author

rickyma commented Jan 12, 2024

What is the difference between the two PlatformDependent? Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'

@rickyma

When using Netty in the code, we should always use the io.netty:netty-all dependency instead of the io.grpc:grpc-netty-shaded dependency, because the io.netty:netty-all dependency is controlled by our project code (<netty.version>4.1.68.Final</netty.version>), while the Netty used by io.grpc:grpc-netty-shaded is controlled by gRPC's internal Netty version, which is uncontrollable.

@lifeSo

@rickyma
Copy link
Contributor Author

rickyma commented Jan 12, 2024

Could add test unit case to test the funcation of directMemoryUsageReporter? Or I could try later.

@rickyma

Please add the unit tests, thank you.

@rickyma rickyma requested a review from lifeSo January 12, 2024 06:59
@lifeSo
Copy link
Collaborator

lifeSo commented Jan 12, 2024

What is the difference between the two PlatformDependent? Or is there problem using 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent'
@rickyma

When using Netty in the code, we should always use the io.netty:netty-all dependency instead of the io.grpc:grpc-netty-shaded dependency, because the io.netty:netty-all dependency is controlled by our project code (<netty.version>4.1.68.Final</netty.version>), while the Netty used by io.grpc:grpc-netty-shaded is controlled by gRPC's internal Netty version, which is uncontrollable.

@lifeSo

OK, get it.

Could add test unit case to test the funcation of directMemoryUsageReporter?
Or I could try later.

@rickyma
Copy link
Contributor Author

rickyma commented Jan 13, 2024

@lifeSo Can you approve this PR? You can add UTs later. This PR is only for starting NettyDirectMemoryTracker.

Copy link
Collaborator

@lifeSo lifeSo left a comment

Choose a reason for hiding this comment

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

The commit is great and i think no problem.

If add test case in future is ok. @jerqi

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM, merged to master. Thanks @rickyma @lifeSo

@jerqi jerqi merged commit ad9fddd into apache:master Jan 15, 2024
@rickyma rickyma deleted the issue-1189 branch May 5, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants