Skip to content

Conversation

@ericgribkoff
Copy link
Contributor

"This is a large but kinda sorta mechanical change..."

This adds a synchronized fallback update mechanism when use of Atomic*FieldUpdater fails. This ignores the use of atomic field updaters in grpclb and round robin load balancer. The bug in the JDK reflection API seems to only be an issue on some Samsung Android 5.0.x devices, but there are enough of these out there that a workaround is necessary.

Question: The try-catch blocks in this PR catch any throwable from initialization of FieldUpdaterAtomicHelper objects, logs the throwable, and falls back to the synchronized implementation. Should we only catch NoSuchFieldException? This is the only known exception caused by the bug, so it could/should be ok to specialize the catch blocks. Guava did not do this, however. See prior art: https://github.com/google/guava/blob/fc992745150d95544fec68b9c6e89b5c3bc44b15/guava/src/com/google/common/util/concurrent/AbstractFuture.java#L147

@ericgribkoff ericgribkoff force-pushed the atomic_field_updater_woes branch from 52d3c10 to 7b02c18 Compare November 15, 2017 23:26
@ericgribkoff ericgribkoff added the TODO:backport PR needs to be backported. Removed after backport complete label Nov 15, 2017
@ericgribkoff
Copy link
Contributor Author

Replaced by #3754

@ejona86 ejona86 removed the TODO:backport PR needs to be backported. Removed after backport complete label Nov 17, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants