Go to file
Matěj Suchánek 4ae63d1b4d Avoid event insertion if possible
Why:
* On wikis with lots of bot activity like Wikidata, there is a large
  volume of edits which can potentially create an article-linked
  notification. These notifications are now actually rarely sent
  because they are disabled for bots (T318523). However, the event
  record is always inserted into the database, with no reference to
  it, bloating the database.

What:
* Do not unconditionally insert an event into the database when
  Event::create is called. Pass it to downstream calls and have
  it inserted when it's clear it will actually be needed (i.e.,
  a notification is definitely going to be created).
* Pass the event's payload to the job queue instead of requiring
  its ID. Introduce Event::newFromArray, which unlike ::loadFromRow
  handles ::toDbArray values that haven't been inserted into
  the database yet.
* Introduce Event::acquireId which ensures the event has been
  inserted prior to returning its ID as well as it does not get
  re-inserted.

Bug: T221258
Change-Id: I8b9a99a197d6af2845d85d9e35c6703640f70b91
2024-10-11 20:12:11 +02:00
.phan Use HookHandlers for UserMerge hook 2023-08-16 05:30:19 +00:00
i18n Localisation updates from https://translatewiki.net. 2024-09-30 09:21:00 +02:00
images Remove all traces of cross-wiki beta feature 2019-04-17 22:18:13 -07:00
includes Avoid event insertion if possible 2024-10-11 20:12:11 +02:00
maintenance Use expression builder instead of raw sql 2024-07-21 22:52:17 +02:00
modules Set Codex-token for @notification-background-unseen 2024-09-02 17:31:47 +02:00
scripts Use ::class for class name resolution 2022-06-16 22:36:46 +02:00
sql Drop schema updates from MW 1.33 and 1.34 2023-12-22 01:56:23 +00:00
tests Avoid event insertion if possible 2024-10-11 20:12:11 +02:00
.eslintignore eslint: Use .eslintignore 2022-05-09 14:00:02 +01:00
.eslintrc.json eslint: remove redundant ruleset wikimedia/jsdoc 2024-05-15 17:31:36 +00:00
.gitignore Add DS_Store to gitignore 2021-07-13 13:58:44 -05:00
.gitreview Whoops, track not trace 2016-10-24 17:02:28 -07:00
.mailmap Update Legoktm's mailmap entry 2021-04-11 19:15:52 -07:00
.phpcs.xml tests: Resolve phpunit filename deprecation errors 2023-08-12 21:07:15 +02:00
.stylelintrc.json stylelint: Enable selector-pseudo-element-colon-notation 2023-03-30 00:24:47 +02:00
.svgo.config.js build: Update SVGO to v3.0.2 & re-crush icons 2023-06-14 19:12:11 +00:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 01:46:10 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 44.0.0 2024-08-11 07:37:09 +00:00
COPYING Add COPYING 2014-01-24 16:00:24 -08:00
Echo.alias.php Add aliases for Simplified & Traditional Chinese 2024-01-07 16:55:25 +08:00
extension.json build: Update MediaWiki requirement to 1.43 2024-08-22 16:58:41 -04:00
Gruntfile.js eslint: Use .eslintignore 2022-05-09 14:00:02 +01:00
jsdoc.json build: Update jsdoc-wmf-theme to 1.1.0 2024-06-26 11:31:52 +01:00
package-lock.json build: Updating micromatch to 4.0.8 2024-08-25 00:45:50 +00:00
package.json build: Update jsdoc-wmf-theme to 1.1.0 2024-06-26 11:31:52 +01:00
quibble.yaml build: Add quibble.yaml and enable early warning bot feedback 2023-03-31 11:42:44 +02:00
README.md Replace jsduck with jsdoc 2024-04-30 15:29:06 +01:00
RELEASE_NOTES BREAKING CHANGE: Use ISO 8601 for 'ts' in cross-wiki summary. 2016-07-27 17:00:05 -04:00
ServiceWiring.php Merge "Inject service RevisionStore into RevisionLocalCache" 2024-03-18 09:06:16 +00:00

The Echo extension provides an in-wiki notification system that can be used by other extensions.