This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
Remove finalize from RecordEventsSpanImpl #2043
Merged
nilebox
merged 1 commit into
census-instrumentation:master
from
spkrka:krka/no_finalize
Sep 22, 2020
Merged
Remove finalize from RecordEventsSpanImpl #2043
nilebox
merged 1 commit into
census-instrumentation:master
from
spkrka:krka/no_finalize
Sep 22, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will reduce GC pressure since the VM will not call Finalizer.register() when creating Span objects. Since this method is synchronized on a static lock it can be a source of contention. It also avoids contention on the same lock when running runFinalizer() as part of GC
spkrka
requested review from
dinooliva,
rghetia,
songy23 and
a team
as code owners
July 16, 2020 11:17
nilebox
reviewed
Jul 20, 2020
@@ -586,15 +586,4 @@ private RecordEventsSpanImpl( | |||
timestampConverter != null ? timestampConverter : TimestampConverter.now(clock); | |||
startNanoTime = clock.nowNanos(); | |||
} | |||
|
|||
@SuppressWarnings("NoFinalizer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the severity of the issue this code is causing, we decided to revisit the decision and proceed with this change. See #2045 for more context.
nilebox
approved these changes
Sep 22, 2020
zoercai
pushed a commit
to zoercai/opencensus-java
that referenced
this pull request
Sep 24, 2020
Fixes census-instrumentation#2045 This will reduce GC pressure since the VM will not call Finalizer.register() when creating Span objects. Since this method is synchronized on a static lock it can be a source of contention. It also avoids contention on the same lock when running runFinalizer() as part of GC (cherry picked from commit eab6382)
zoercai
added a commit
to zoercai/opencensus-java
that referenced
this pull request
Sep 25, 2020
Fixes census-instrumentation#2045 This will reduce GC pressure since the VM will not call Finalizer.register() when creating Span objects. Since this method is synchronized on a static lock it can be a source of contention. It also avoids contention on the same lock when running runFinalizer() as part of GC (cherry picked from commit eab6382)
zoercai
added a commit
to zoercai/opencensus-java
that referenced
this pull request
Sep 25, 2020
Fixes census-instrumentation#2045 This will reduce GC pressure since the VM will not call Finalizer.register() when creating Span objects. Since this method is synchronized on a static lock it can be a source of contention. It also avoids contention on the same lock when running runFinalizer() as part of GC (cherry picked from commit eab6382)
zoercai
added a commit
that referenced
this pull request
Sep 25, 2020
* Remove finalize from RecordEventsSpanImpl (#2043) Fixes #2045 This will reduce GC pressure since the VM will not call Finalizer.register() when creating Span objects. Since this method is synchronized on a static lock it can be a source of contention. It also avoids contention on the same lock when running runFinalizer() as part of GC (cherry picked from commit eab6382) * Bump version to 0.27.1 * Bump version to 0.27.2-SNAPSHOT * Bump version to 0.27.1 * Bump version to 0.27.2-SNAPSHOT
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2045
This will reduce GC pressure since the VM will not call
Finalizer.register() when creating Span objects.
Since this method is synchronized on a static lock
it can be a source of contention.
It also avoids contention on the same lock when running
runFinalizer() as part of GC