Currently, when a user submits a request to stop or start a function instance, 
the worker that receives the request attempt to redirect the stop or start 
request to the actual worker running the function instance.  I don't think this 
is a good mechanism for this and it is prone to failures.  What is happening 
here is a state change, however the state change isn't persisted, thus when 
failures happen this state change is lost.  For example, if the worker running 
the function instance has stopped the instance but then the worker itself 
crashes. Upon restarting, the worker will start the function instance in the 
incorrect state.

The better mechanism for doing this add a field FunctionMetaData, to indicate 
the state of the function instance.  And when the worker that is 
assigned/running the function instances reads from the FunctionMetaData topic 
gets an update of the state, it can act accordingly.  This will also persist 
across failures and functions instances will get restarted in the correct state.

@rdhabalia can you provide feedback?


[ Full content available at: https://github.com/apache/pulsar/issues/2720 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org

Reply via email to