Utility to search for processes that have ZLINK'd a particular routine

Bug #597335 reported by Jon Tai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenVista/GT.M Integration
Fix Released
Medium
Unassigned

Bug Description

Before we implement bug #462881, it would be nice to have a routine that allows you to search for all processes that have ZLINK'd a particular routine. That way, if you modify the routine, you know which processes you have to restart.

I'm envisioning something like D ZLINKED^MSCZJOBU(.Y,"DI") would set Y to something like:

Y(1349)=""
Y(1358)=""

if those two processes had DI ZLINK'd.

Related branches

Jon Tai (jontai)
Changed in openvista-gtm-integration:
importance: Undecided → Medium
milestone: none → 0.8.10
status: New → Confirmed
Revision history for this message
jeff.apple (jeff-apple) wrote :

I don't see the need for this, and it seems unnecessarily complex. Deriving that list - querying the processes and getting the information back - is not terribly complicated, but it isn't trivial, either. Just have all running process zlink the given routine. zlinking is something that's done infrequently,if at all, in production, so we really don't have to be concerned with performance. We can just fire off a signal or something for the other processes to zlink and be done with it as far as the originating process is concerned.

Revision history for this message
Jon Tai (jontai) wrote :

You're suggesting that each process' signal handler listen for a signal and upon receiving it, it should go re-ZLINK the given routine?

That would certainly simplify things from an operations point of view, since processes would not have to be restarted.

The problem is, we only get one signal handler, and we also don't get any arguments. So I'm not sure how to make that play nicely with the current signal handler, $$JOBEXAM^ZU. I'm also not sure if we can ZLINK from within an interrupt (what if the process is running the routine?).

Revision history for this message
jeff.apple (jeff-apple) wrote :

All good questions, worthy of investigation. :)

How did you plan to get the list of jobs that had a certain routine already linked?

It would just be nice to be able to have your ZLINKED^MSCZJOBU actually to the zlinking itself.

I've played around with this a little, before, and I do have a routine that does exactly this - zlinks in all running processes - but it's part of a larger development effort that does indeed muck around with the signal handler. Nevertheless, it does work as a proof-of-concept.

Just food for thought.

Revision history for this message
Jon Tai (jontai) wrote :

I think even if we had the capability to broadcast a "SIGHUP" and tell all the processes to re-zlink everything, it would still be nice to be able to query the information.

Instead of doing a programatic entry point as I suggested in the original bug report, I've enhanced ^%SS (actually SS^MSCZJOBS) to take an arbitrary list of filters. Previously, it only supported one hard-coded filter -- whether or not the process is in the current namespace. Now you can filter processes by instance name, Linux user, OpenVista user, running routine, ZLINK'd routine, or $J. I've also added an INT tag to %SS and MSCZJOBS to allow easy access to this functionality.

Since the code is in a "UI" routine, it's minimally invasive. The only "invasive" change in this patch is the one line added to JOBEXAM^ZU to collect the routine information we need.

I'll file a new future/wishlist bug for changing the signal handler to ZLINK all routines. It's going to have to be a much more well-researched change.

description: updated
Changed in openvista-gtm-integration:
status: Confirmed → Fix Committed
Revision history for this message
Jon Tai (jontai) wrote :

In case it wasn't clear, the end user's method of accessing this would be to D INT^%SS.

Jon Tai (jontai)
Changed in openvista-gtm-integration:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.