shnapz commented on PR #36781:
URL: https://github.com/apache/beam/pull/36781#issuecomment-4292286050

   @Abacn thanks, pushed a rewrite along these lines:                           
                                                                                
         
                                                                                
                                                                                
    
   - Double-checked lock with canSkipInit(requestedType): skip when `SOURCES != 
null && (requestedType == null || requestedType.equals(CURRENT_LINEAGE_TYPE))`.
   - Tracking the active type in a separate volatile Class<? extends 
LineageBase> CURRENT_LINEAGE_TYPE. Functionally equivalent to your sketch.
   - Switched SOURCES/SINKS to volatile.
   - Also dropped the lazy fallback in getSources()/getSinks() - now 
checkNotNull with a clear message, so we never silently swap plugin lineage for 
defaults. WDYT?
                                                                                
                 
   PTAL


-- 
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]

Reply via email to