From: Robert Varga Date: Thu, 4 May 2017 21:52:57 +0000 (+0200) Subject: Do not retain initial SchemaContext X-Git-Tag: release/nitrogen~196 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=0a2ed6b43f45b92f09c291e99e2e66a7fa18085f;hp=0a2ed6b43f45b92f09c291e99e2e66a7fa18085f Do not retain initial SchemaContext While looking over a memory dump I have noticed that we retain SchemaContext inside Shard$Builder, which is being retained via Props (which are used to restart the actor). This reference is not updated as the SchemaContext is updated, which means we are wasting memory and are causing Shard to come up with an ancient SchemaContext after a failure. Fix this by having an AtomicReference holder for SchemaContext and have Shard have a Supplier. Change-Id: I73fcae46f249d3679522eb7dbbb059e43c5af6c7 Signed-off-by: Robert Varga ---