I am developing a custom processor for my team to handle processing of our flowfiles to various output paths and splitting based on specific conditions.
Recently I've run into an issue that, as far as I can tell the only reason would be thread-safety causing a variable to be overridden after an if check passed by another "instance" using that variable.
So my question is, say I have a processor along the lines of:
Now lets say I have 5 or 10 concurrent instances of this running from the scheduling options of the processor.
Do ALL those instances have their own instance of the mySet and myCounter variables, or is these single global variables between all instances, which can be modified at any point by any of the threads and cause unpredictable values?