[Dbix-class] ResultSet->single() call hangs

Doan, Dzung Dzung.Doan at neustar.biz
Sat Nov 20 00:24:34 GMT 2010


Hi,

I'm a DBIx::Class newbie and facing an issue as the following.

I have an Oracle DB (11g). In the DB schema I have a table called 'File' with a unique key column "path". I have another table called 'Content' linked by foreign key to 'File'; these 2 tables basically model files with their content in a file system. I implement a copy operation that simulates the file copy in the file system; it basically creates a copy of both the file row in the 'File' table and its associated contents in the 'Content' table (it will delete the destination file first if it exists; just like in the file system). Then I test by 'copying' one existing 'file' to another place, and then 'copying' it back to the original location in a separate test.

Looks like sometimes the first copy succeeds, but if so the second copy (back) almost will definitely fail (hang there, not finish). Sometimes even the first copy also hangs and doesn't finish.

I look at the SQL tracing generated by DBIx::Class and looks like when it hangs, it always hangs right after the SQL generated by the following perl statement:

return $schema->resultset('File')->single({ path => $filePath });

Any idea on what's happing and how I can resolve it?

Thanks for any input,
Dzung.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20101119/d77e97ec/attachment.htm


More information about the DBIx-Class mailing list