lostluck commented on pull request #15657: URL: https://github.com/apache/beam/pull/15657#issuecomment-940436100
Taking a look, but before I start. > PTAL. Addressed the old comments. However, I didn't understand clearly, the approach of initializing sampler in exec.Pardo's Up method. I think what I meant could be more clearly said. Instead of "sampler" which is very overloaded, I should have said "state switcher" which tells the underlying metric the current state & PTransform. Basically it could have 3 methods (Start, Process, Finish) which switch the state to the current enum (start process finish), and then do an atomic store with the state. This avoids allocating a new state every time these are called, and avoids any race conditions with the reading sampler goroutine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
