walkinggo commented on issue #23723:
URL: https://github.com/apache/pulsar/issues/23723#issuecomment-2603767853

   I found that the `MemoryLimit` class mentioned here is actually a static 
inner class of `ThreadRuntimeFactoryConfig`. If it is directly added to 
`FunctionConfig`, it will cause a Circular Dependency issue. Perhaps we should 
treat it as a separate class. 
   
   Additionally, the constructor of `ThreadRuntimeFactory` used in 
`JavaInstanceStarter` does not pass the required `MemoryLimit` parameter, which 
leads to passing `Optional.empty()` as `MemoryLimit` in the `initialize` method 
of `ThreadRuntimeFactory`. I think we should add a constructor to 
`ThreadRuntimeFactory` that takes this parameter.
   
   Before calling the required constructor, `instanceConfig` has already been 
initialized in `JavaInstanceStarter`. `MemoryLimit` can be stored and passed as 
a member variable of `instanceConfig`. I noticed that other member variables of 
`instanceConfig` are coming from `JavaInstanceStarter`. Should we also add the 
`MemoryLimit` variable in `JavaInstanceStarter` to support its configuration 
via the command line?


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