1
Vote

GenericPersistenceService - LoadWorkflowsWithExpiredTimers raises Ownership Exceptions

description

Running 0.3.0.0 Changeset 15876. I'm running multiple runtimes in a load balanced environment, with LoadInterval set to 1 second. When two runtimes try to pick up the same instance with an expired timer, the PersistenceException is passed up to RaiseServicesExceptionNotHandledEvent twice, when it shouldn't be at all (this is a normal, ignorable scenario).
 
Suggested fixes:
  1. LoadWorkflowInstanceState should not be calling RaiseServicesExceptionNotHandledEvent in its catch block, because it's throwing the exception to the caller (i.e. it's not "not handled").
     
  2. loadWorkflowsWithExpiredTimers tries to catch and ignore the WorkflowOwnershipException, but your implementation of LoadWorkflowInstanceState wraps it inside a PersistenceException, so the catch block doesn't see it. Change the catch block in loadWorkflowsWithExpiredTimers to trap for a PersistenceException, and just "continue" if the inner exception is a WorkflowOwnershipException.

comments