Hi Mandy,
On 21/06/16 17:01, Mandy Chung wrote:
On Jun 21, 2016, at 8:39 AM, Daniel Fuchs <daniel.fu...@oracle.com> wrote:
I don't understand this scenario.
ConfigurationData should remain as simple as possible.
Logger.getLogger() / LogManager.demandSystemLogger() will never return
a logger before it has been configured.
When we're merging the configuration data the system logger has
not been configured yet. Level etc are already volatile in Logger and
we should not introduce any new synchronization there.
This is the scenario I was thinking about - would this ever happen?
T1 is creating a system logger named “foo” and calling this.importConfg(other)
at line 462 after setLevel(otherLevel) is done.
this is the system logger “foo” and other is the user-created logger “foo”.
T2 is calling other.setLevel(newLevel) on user-created logger “foo”.
Indeed, good catch! I should have seen that :-(
Here is a patch that should take care of the issue:
http://cr.openjdk.java.net/~dfuchs/webrev_8159245/webrev.05
Thanks for your offline suggestions on how to deal with that
scenario.
best regards,
-- daniel
Mandy