Github user mattf-horton commented on a diff in the pull request:
    --- Diff: 
    @@ -116,6 +122,9 @@ public void execute(Tuple tuple) {
           boolean ackTuple = !writer.handleAck();
           int numWritten = 0;
           if(sensorParserConfig != null) {
    +        if (configUpdatedFlag.getAndSet(false)) {
    --- End diff --
    It is necessary to re-call getSensorParserConfig(), because of the tiny 
chance that the change in config was interjected between the "execute()" thread 
doing line 118 and doing line 125.  If this happened, we would send the OLD 
config (from sensorParserConfig) to parser.configurationUpdated(), then clear 
the flag, resulting in not picking up the config change until...the next config 
change.  Bad.  Unless I misunderstand the TreeCache, which may be.
    However, if we do this correctly, we are not delaying the change to the 
parser in a significant way, because the ParserBolt calls 
parser.configurationUpdated() before calling any other parser.* methods.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to