Progress information for system processes (OpenInsight 64-bit)
At 18 OCT 2021 05:10:41PM Matthew Crozier wrote:
Is there a more formalised way of capturing progress information for system processes, such as SELECT statements and index builds, in OI 10? Or even being able to cancel these processes?
In previous versions this could be done by putting a shell around TEST_ABORT - but it seems this function does not exist in 10.0.8.1, even though it appears there are several system routines that call it? There is a REV_TEST_ABORT routine, but this doesn't appear to be called by anything!?
I'm planning our migration to OI 10, without having anything going yet. How would we refactor this functionality?
Cheers, M@
At 19 OCT 2021 05:03PM bob carten wrote:
s there a more formalised way of capturing progress information for system processes, such as SELECT statements and index builds, in OI 10? Or even being able to cancel these processes?
Yes.
We have added a function named rti_resolve_Select_callback, and equates ( see below )
To cancel a select
rti_resolve_select_callback( rtirsc_cancel$)There is more functionality - you can register one or more listeners. Those listeners will receive notification of the progress of a select or of a cancel, so you can provide your own progress messages if desired.
I'll provide more detail in the revDevX blog
The function header looks like
Function rti_resolve_Select_callback(method, cursor, p1,p2,p3,p4) /* ** Call back Function embedded In vaious segments of the Select / Readnext infrastructure ** The goal is To provide a way To interrupt selects ** May as well have it collect info For other programs To report progress ** Allow programs To register themselves as listeners, notifies them ** Returns true If select should countinue, false If Select should stop ** ** ** Methods ** rtirsc_start$ - called by rtp 11 when Select starts, notifies registered listeners ** rtirsc_complete$ - like start, but On complete ** rtirsc_complete$ - like start, but On complete ** rtirsc_cancel$ - called by any program which wishes To cancel a Select **The insert looks like
compile Insert rti_resolve_Select_callback_equates Equ rtirsc_start$ To 1 Equ rtirsc_progress$ To 2 Equ rtirsc_complete$ To 3 Equ rtirsc_cancel$ To 4 Equ rtirsc_error$ To 5 Equ rtirsc_register_listener$ To 6 Equ rtirsc_unregister_listener$ To 7 Equ rtirsc_getContinue$ To 8 Equ rtirsc_SetContinue$ To 9
At 19 OCT 2021 05:33PM Matthew Crozier wrote:
Is there a more formalised way of capturing progress information for system processes, such as SELECT statements and index builds, in OI 10? Or even being able to cancel these processes?
Yes.
We have added a function named rti_resolve_Select_callback, and equates ( see below )
Great! Thanks for this Bob! I look forward to the article - it will go nicely with the last one on Rlist ;)
Is this also used for index builds, or even Btree Extract? The Insert look generic enough.
Cheers, M@
At 12 JAN 2022 06:10PM Matthew Crozier wrote:
There is more functionality - you can register one or more listeners. Those listeners will receive notification of the progress of a select or of a cancel, so you can provide your own progress messages if desired.
I'll provide more detail in the revDevX blog
Hi Bob,
Now that we're in a documentation phase ;), can I just bump this up for the revDevX blog? I'd like to refactor my Test_Abort() stuff :)
Cheers, M@
At 17 JAN 2022 05:07PM bob carten wrote:
Hi Matt,
I've been working on the example. This has inspired me to go back and actually finish the rti_resolve_Select_callback program to perform as promised.
At 17 JAN 2022 05:23PM Matthew Crozier wrote:
Hi Matt,
I've been working on the example. This has inspired me to go back and actually finish the rti_resolve_Select_callback program to perform as promised.
Ha! :biggrin: . Thanks Bob :)
Cheers, M@