lkuchars commented on PR #10291: URL: https://github.com/apache/nifi/pull/10291#issuecomment-3325677211
> > @exceptionfactory thank you for taking your time to look at this. It would be nice to get the validation of the schema without manual intervention. I think the original ProtobufReader worked that way, and it used cache. I think your suggestion with a cache is spot on. I'll just remove the throwaway compiler `// Create a throwaway schema compiler for validation to avoid polluting the main compiler cache. final ProtobufSchemaCompiler validationCompiler = new ProtobufSchemaCompiler(getIdentifier() + "_validation", getLogger());` I think my concerns about not polluting the global compiler cache are unjustified. I can use the schema compiler initialized in onEnabled. That way, subsequent validation calls will use the cache implementation from the ProtobufSchemaCompiler. WDYT? > > Thanks for the reply @lkuchars. Using the same `schemaCompiler` instance could work, but it would have to be instantiated somewhere else, because `OnEnabled` methods are invoked manually, after validation. I moved the initialization of the schemaCompiler to the init() override. -- 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]
