Address the race condition on propertyUsageMap when we are trying to flush the existing map and then empty it. We use the AtomicReference here to hot swap the existing map out for a new empty one before we then copy the old map to be flushed.
Also tacked on a small logging change here, which flips the logging to only happen when it starts up the flushing and doesn't print at all when nothing is flushing. SBN by default will setup the AccessMonitorUtil twice, so we just add confusing noise for no reason with the prior logs.
Address the race condition on propertyUsageMap when we are trying to flush the existing map and then empty it. We use the AtomicReference here to hot swap the existing map out for a new empty one before we then copy the old map to be flushed.
Also tacked on a small logging change here, which flips the logging to only happen when it starts up the flushing and doesn't print at all when nothing is flushing. SBN by default will setup the AccessMonitorUtil twice, so we just add confusing noise for no reason with the prior logs.