ipm icon indicating copy to clipboard operation
ipm copied to clipboard

Open Transaction and Production starting issues

Open evshvarov opened this issue 1 year ago • 2 comments
trafficstars

This application starts production after installastion.

zpm "install iris-hl7"

And it reports errors because of open transaction:

USER>zpm "install iris-hl7"

[USER|iris-hl7]	Reload START (/usr/irissys/mgr/.modules/USER/iris-hl7/0.1.0/)
[USER|iris-hl7]	requirements.txt START
[USER|iris-hl7]	requirements.txt SUCCESS
[USER|iris-hl7]	Reload SUCCESS
[iris-hl7]	Module object refreshed.
[USER|iris-hl7]	Validate START
[USER|iris-hl7]	Validate SUCCESS
[USER|iris-hl7]	Compile START
[USER|iris-hl7]	Compile SUCCESS
[USER|iris-hl7]	Activate START
[USER|iris-hl7]	Configure START
09:27:18.030:Ens.Director: Production 'otw.NewProduction' starting...
09:27:18.093:Ens.Queue: 1 open user transaction found; committing before EnQueue(1)
09:27:18.093:Ens.Director: Production 'otw.NewProduction' started.
[USER|iris-hl7]	Configure SUCCESS
[USER|iris-hl7]	Activate SUCCESS
ERROR! ObjectScript error: <COMMAND>LoadNewModule+133^%ZPM.PackageManager.Developer.Utils.1 *NoTransaction

evshvarov avatar Feb 04 '24 09:02 evshvarov

This has been encountered internally as well. It would be great for IPM to provide a way to do this in a background job to isolate from the current transaction. (I've held the position of "Library code, including Ens.Director, shouldn't commit/roll back callers' transactions as a side effect" to no avail.)

isc-tleavitt avatar Mar 15 '24 14:03 isc-tleavitt

Calling this a enhancement - specifically, we need to provide a "right way" to have an <Invoke> do something outside of the transaction and only after installation has fully completed.

isc-tleavitt avatar Mar 15 '24 14:03 isc-tleavitt