Forum OpenACS Development: Response to rp_serve_abstract_file and PerformanceModeP

Collapse
Posted by Don Baccus on
I see what's causing the problem in rp_serve_abstract_file ... it's the ad_conn -set file $path line.

This explains why Lars's suggestion which included setting the file failed, though I would've expected the failure behavior to be identical.  Hmmm...I'm not going to track that mystery, though.

The request processor calls rp_serve_abstract_file then sets the file and path_info parts of the URL map to their current ad_conn values.  This URL map is used directly in performance mode to go directly to the correct file rather than do the site node work.

Here's the sequence:

1. rp_handler calls rp_serve_abstract_file for "index.vuh"

2. rp_serve_abstract_file sets ad_conn file to the path to "index.vuh"

3. it then calls the file executing "index.vuh"

4. you call rp_serve_abstract_file with a new file

5. rp_serve_abstract_file sets ad_conn file to this new file path

6. it finishes

7. index.vuh finishes

8. our first rp_serve_abstract_file finishes

9. rp_handler sets the url map to the current ad_conn file value, which was set in step 5 - oops!  Performance mode dies.  Not always because you probably hit different threads on the server rather than the same one over and over, etc.

This tells me that a boolean switch to rp_serve_abstract_file which tells it not to modify the ad_conn file value would do the "ad_internal_redirect" action.

At least I think this is true.  Give it a whirl if you have time, Tilmann, and report back!

If we add this switch and remove "-private" and document the proper way to call it to avoid problems in performance mode then I have no problem with our using it in this way...assuming Tilmann's tests show that it works, that is.