I never thought I'd have to ask about thread safety in an Erlang
library, but here goes. If I have two processes using erlydb at the
same time with the psql driver, about 50% of my erlydb calls fail,
with errors that vary widely. Here's one:
ERROR erlang code crashed:
File: appmod:0
Reason: {badarg,[{erlydb_base,get,2},
{erlyweb,ewc,2},
{erlyweb,render_subcomponent,2},
{erlyweb,'-ewc/2-lc$^0/1-0-',2},
{erlyweb,'-ewc/2-lc$^0/1-0-',2},
{erlyweb,ewc,2},
{erlyweb,render_subcomponent,2},
{erlyweb,'-ewc/2-lc$^0/1-0-',2}]}
Req: {http_request,'GET',{abs_path,"/"},{1,1}}
Here's another one:
{ok,
{sql_error,
"25P02",
"Rexec_simple_query L928 Fpostgres.c Mcurrent transaction is
aborted,
commands ignored until end of transaction block"}}
(Yes, that says 'ok'; it's a return value from an erlydb 'find'
function that *failed* that says 'ok' rather than throwing an
exception.) For both of those, I can re-run the line of code and it
works. Or doesn't. It depends. There are others, but none that I can
reproduce in just a few seconds, which is maybe worse.
Unless someone has a quick solution, I'm going to have to assume that
this is indicative of a major design issue and start re-writing this
driver. Or reconsidering erlydb at all. That's a serious architectural
flaw. Are you *sure* you want to re-invent the database abstraction
wheel?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---