digideskio / zotonic

Automatically exported from code.google.com/p/zotonic
0 stars 0 forks source link

z_depcache: to release the locks immediately after exception in F() #136

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. See attached archive. Integrate the resource and dispatch rule from archive 
to your existing project.
2. z:m().
3. In browser: go to http://localhost:8000/test. You will see HTTP 500 error. 
4. Press F5 to reload the page.

What is the expected output? What do you see instead?

Expected result: to see HTTP 500 again and again with following message in 
zotonic console:

=ERROR REPORT==== 10-Feb-2011::10:29:18 ===
webmachine error: path="/test"
{error,
    {error,
        {case_clause,
            {error,
                {error,error,<<"42601">>,
                    <<"syntax error at or near \"AAAAAAAAAAAAAA\"">>,
                    [{position,<<"1">>}]}}},
        [{z_db,q1,3},
         {z_depcache,memo,5},
         {resource_test012,to_html,2},
         ...

Real result: After pressing F5, the responce hungs for some time.
According to zotonic console, z_depcache doesn't releasing internal lock on key 
'nhs45yhws5zedfg' after exception in F():
=ERROR REPORT==== 10-Feb-2011::10:29:50 ===
webmachine error: path="/test"
{error,{exit,{timeout,{gen_server,call,
                                  ['z_depcache$hints',
                                   {get_wait,nhs45yhws5zedfg},
                                   30000]}},
             [{gen_server,call,3},
              {z_depcache,memo,5},
              {resource_test012,to_html,2},
              ...

What version of the product are you using? On what operating system?
Zotonic 0.6 from HG.

Please provide any additional information below.
Lock in z_depcache is released after timeout.

Original issue reported on code.google.com by supp...@suggest.io on 10 Feb 2011 at 7:49

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision d29fb6a451.

Original comment by scherpenisse on 25 Feb 2011 at 10:22

GoogleCodeExporter commented 8 years ago
Thanks for your detailed report!

I reproduced the issue and I think I have fixed it.
Backported it to the release-0.6.x branch. Can you check if you still 
experience it?

Original comment by scherpenisse on 25 Feb 2011 at 10:24