brion added a comment.
> The above code would replace much of what is in the Revision class now, in particular insertOn(). We can keep Revision around, but I'm not sure we can provide b/c for insertOn(). b/c here looks relatively straightforward to me; it creates a new revision with an updated default slot from the text content & metadata in the Revision object. This should be implementable by calling through to RevisionBuilder. The remaining questions are - whether we want to pass the $dbw parameter through (do we always go through load balancer in which case it'll be the same connection anyway? or are there cases where a separate connection may be used to insert revs for some reason?) and - whether there's any nested-transaction problems if someone tries to insert multiple revs in an explicitly larger transaction (Revision\insertOn doesn't try to manage transactions itself, and will leak external storage blobs if its text & revision updates get rolled back.) TASK DETAIL https://phabricator.wikimedia.org/T107595 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: daniel, brion Cc: JJMC89, RobLa-WMF, Yurik, ArielGlenn, APerson, TomT0m, Krenair, intracer, Tgr, Tobi_WMDE_SW, Addshore, Lydia_Pintscher, cscott, PleaseStand, awight, Ricordisamoa, GWicke, MarkTraceur, waldyrious, Legoktm, Aklapper, Jdforrester-WMF, Ltrlg, brion, Spage, MZMcBride, daniel, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, jayvdb, fbstj, Mbch331, Jay8g, bd808 _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
