Jeroen De Dauw has submitted this change and it was merged. Change subject: Rewritten SQLStore3 writing methods ......................................................................
Rewritten SQLStore3 writing methods This is a rewrite of large parts of SMW_SQLStore3_Writers.php. The only methods that are almost unaffected are the ones related to cahning titles and processing redirects (may appear changed in diff since they have been moved to the end). This change should fix the property statistics computation. It also prepares an acurate semantic diff implementation later on. Main changes/key points: * Cleaned up code, splitting everything into smaller methods with a clear task. * Changed writing workflow to compute a full diff of table rows before writing anything * The new writing code deletes only the table rows that are really obsolete, and inserts only those that are added. If a change only deletes or adds one value, then this is all that will be done. * The property statistics are updeated by comparing the real DB contents to the new contents that is to be written. No higher-level data structures or SMW objects are invloved. * There is no longer a separate delete method. To delete all data, we update it to be empty. This ensures that all necessary updates really happen whenever the store is changed (since there are fewer methods that change the store at all). * The new code has no issues with input errors or redirects any more. * The code is now properly documented. Patch set 2: Small change. * Improve some details in method design (e.g. pass a table object where a table name was passed). * Improve the construction of DELETE conditions for (supposed) performance gain. * Fix a few typos in inline comments. * Call freeResult() on a DB result where this had been forgotten. Change-Id: I78596341b4427604c31b6d3b15acd894e47ccec0 --- M includes/storage/SQLStore/SMW_SQLStore3.php M includes/storage/SQLStore/SMW_SQLStore3_Readers.php M includes/storage/SQLStore/SMW_SQLStore3_SetupHandlers.php M includes/storage/SQLStore/SMW_SQLStore3_Writers.php M includes/storage/SQLStore/SMW_Sql3SmwIds.php 5 files changed, 499 insertions(+), 397 deletions(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/32397 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78596341b4427604c31b6d3b15acd894e47ccec0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/SemanticMediaWiki Gerrit-Branch: master Gerrit-Owner: Markus Kroetzsch <mar...@semantic-mediawiki.org> Gerrit-Reviewer: Daniel Werner <daniel.wer...@wikimedia.de> Gerrit-Reviewer: Denny Vrandecic <denny.vrande...@wikimedia.de> Gerrit-Reviewer: Foxtrott <s7ep...@gmail.com> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Markus Kroetzsch <mar...@semantic-mediawiki.org> Gerrit-Reviewer: Mwjames <jamesin.hongkon...@gmail.com> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Nischayn22 <nischay...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits