Anomie added a comment.

> Since DataUpdate objects are generally not serializable, ParserOutput skips 
> them during serialization (see ParserOutput::__sleep).


I don't know about "are generally not serializable", but the reasoning given 
both in the comment and in Gerrit change 119342 
<https://gerrit.wikimedia.org/r/#/c/119342/> is to avoid saving unneeded data.

In https://phabricator.wikimedia.org/T86305#965790, @daniel wrote:

> The only fix I can think of offhand would be to check if there are custom 
> updates, and if there are, don't stash the edit.


Or you could rework things so DataUpdate must be serializable, and have 
ApiStashEdit set a flag on the ParserOutput to tell it to preserve the update 
objects. The only user of ParserOutput::addSecondaryDataUpdate() in extensions 
in git seems to be Wikibase itself.

As for implementations of DataUpdate in core, at first glance it doesn't seem 
like they're necessarily non-serializeable. The DB connection in SqlDataUpdate 
could be excluded in __sleep and reopened in __wakeup, and similar things could 
be done for the WikiPage needed by LinksDeletionUpdate and the Title in 
LinksUpdate.


TASK DETAIL
  https://phabricator.wikimedia.org/T86305

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Anomie
Cc: Aklapper, daniel, aude, hoo, Lydia_Pintscher, aaron, ori, Jackmcbarn, 
Anomie, cscott, Wikidata-bugs, Jdforrester-WMF, Legoktm



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to