xApplication::checkForNewBatchJobs();
Why might you need this?
In my case, I need to call this because I think there is a bug caused by a race condition that can occur with reliable asynchronous (SysOperationExecutionMode::ReliableAsynchronous) processes that are called from the client.
What happens when you call a reliable asynchronous process client side, two things happen at the same time from `\Classes\SysOperationController\doBatch`:
- Batch task record is inserted to \Data Dictionary\Tables\Batch)
- Some sort of new thread is spun up asynchronously via `\Classes\SysOperationController\asyncWaitForBatchCompletion`
So, my theory on what can happen is the async polling process (`\Classes\SysOperationFrameworkService\waitForBatchJob`) will try and select the Batch record and may not find it because the Batch record hasn't finished inserting.
In my case, I've overloaded the doBatch() method and put some tracking logic with pessimisticLock that slows down the Batch insert just enough to periodically cause this...so I end up with batch jobs sometimes that are waiting ~60 seconds to be picked up.
Good post Alex.
ReplyDeleteI had trouble on a demo contoso box where the batch jobs didn't start. (I think data got screwed up in the background)
Running the one line in a job saved me time.
Great Article Cloud Computing Projects
DeleteNetworking Projects
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
Nice post,it's very informative.i found the best information.I updated my knowledge with this blog.it can help me to crack GIS jobs in Hyderabad.
ReplyDelete