Ticket #262 (closed enhancement: fixed)

Opened 19 years ago

Last modified 14 years ago

Add ability to detect infinite loop in modelglue.xml event handlers

Reported by: perezd Owned by: DanWilson
Priority: low Milestone: 3.1 Maintenance Beta
Version: 3.0.178 Severity: minor
Keywords: Cc:

Description

Do you think it would be possible to implement some sort of mechanism that could detect if an event is commiting an infinite loop?

see the following situation:

<event-handler name="foo"> <results> <result do="bar" /> </results> </event-handler>

<event-handler name="bar"> <results> <result do="foo" /> </results> </event-handler>

I know this is a really stupid move, and I didn't personally do this, but I did something that was close (bit more complex in my defense :P). Would be a neat feature if you could have it catch that...currently you'll get a CFLOOP error about taking too long, and my proc goes to 100% for quite a while.

Change History

Changed 16 years ago by cfgrok

  • milestone changed from Feature Requests to 2.0.x-next-patch

Changed 16 years ago by DanWilson

  • version changed from 2.0 to 3.0
  • milestone changed from 2.0.x-next-patch to 3.1.x-next-patch

we could look into this for version 3, no point in backporting it.

A simple counter and a cfthrow at 500 iterations would do it, I should think.

Changed 16 years ago by DanWilson

  • owner changed from somebody to DanWilson

Changed 16 years ago by DanWilson

  • status changed from new to assigned

Changed 16 years ago by DanWilson

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in SVN commit 236.

Optionally configurable in modelglue.modelGlueConfiguration: <!-- set the number of event handlers to execute in a given request before giving up --> <property name="endlessLoopThreshold"><value>60</value></property>  

Note: See TracTickets for help on using tickets.