-
Notifications
You must be signed in to change notification settings - Fork 3.9k
core: workaround for Atomic*FieldUpdater bug on some Android devices #3754
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
Conversation
| AtomicLongFieldUpdater.newUpdater(ClientTracer.class, "inboundUncompressedSize"); | ||
| } catch (Throwable t) { | ||
| logger.log(Level.WARNING, "Creating atomic field updaters failed", t); | ||
| tmpOutboundMessageCountUpdater = null; |
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.
initialize all these to null above?
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.
Leaving as-is so that all field updater references are assigned a value or they are all null
| tmpInboundUncompressedSizeUpdater = | ||
| AtomicLongFieldUpdater.newUpdater(ClientTracer.class, "inboundUncompressedSize"); | ||
| } catch (Throwable t) { | ||
| logger.log(Level.WARNING, "Creating atomic field updaters failed", t); |
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.
This is probably SEVERE worthy. A core part of the Java API doesn't work.
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.
Done
Replaces #3753. Leaves the synchronized fallback in place for SerializingExecutor, but just falls back to (racy) volatile updates in the stats modules.