Read this if you use the File Watcher plugin  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Read this if you use the File Watcher plugin  Topic is solved

Postby Mike.Sheen » Sat Jun 17, 2017 2:35 pm

This applies to not just our File Watcher plugin, but any plugin performing database operations which are invoked from another thread.

There is a risk database operations will error with "The transaction operation cannot be performed because there are pending requests working on this transaction".

Any database operation using our objects will get the above error if they, or any other plugin perform queries from another thread. The File Watcher plugin WILL be invoked from another thread, as at the plugin setup it hooks into the file system to receive notifications of when a file appears in a folder. When a file does appear, it is invoked from a thread outside the plugin scheduler thread.

If another plugin run on a schedule (or even another file watcher) has already started a SQL transaction (ie: performed a query and has not committed or rolled back yet), it potentially will be interrupted by the file watcher code - running on another thread - and that will cause the issue.

We've created an article on how to mitigate this: Plugin Scheduler Logs the error The transaction operation cannot be performed because there are pending requests working on this transaction.

We've also have a more elegant solution queued up for the next build in DEV-6017.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 12 guests