inblockio / mediawiki-extensions-Aqua

This MediaWiki extension includes the Aqua implementation. Turning MediaWiki into a powerful versioned notary service with API's for import and export of Data in JSON format.
GNU General Public License v3.0
7 stars 6 forks source link

Collision avoidance on API calls #336

Closed it-spiderman closed 3 weeks ago

it-spiderman commented 2 years ago

When we import over the special page, we have all data already available, so we can check collisions once per page, and if we delete existing page, we are sure that will import a page with a longer chain (since all revision data is already available). This is very different in API import. API imports one revision at the time, so we dont have just a single collision check per page, but one on every revision. Of course, this wont work. As i see, we have several options:

Another approach is to check collision per revision. If revision with the same verification hash exists, skip it, otherwise import. This will import only the difference between two pages. However, this will completely merge two pages with the same name created on different domains, as verification hash will be different even if everything else is the same

FantasticoFox commented 3 weeks ago

This is handled now 55463fca330faeef7f41133af1525191a7a28d01