PageCache shouldn't know about SQLDatabase
Created attachment 129955 [details]
This patch is subtle because currently creating *any* Database will lock out PageCache forever. The way this works for normal ActiveDOMObjects is that PageCache is locked out only while the object is still around.
I need to study the interaction with the DatabaseThread more carefully to see which of these behaviors we want.
Created attachment 130203 [details]
We probably could solve these problems, if necessary, but the work involved doesn't seem worth the benefit at the moment.
> We probably could solve these problems, if necessary, but the work involved doesn't seem worth the benefit at the moment.
Yup, this comment sums up what has been a recurring theme with regard to re-factoring Database stuff to not depend of complex objects that straddle threads (Database and SQLTransaction). Over the years there have be a few occasions where the (large) work involved may have been worth it, but at each crossroad solutions were devised that did not require it. I think the point at which we came closest to biting that bullet was when adding support for Database in workers.