Page MenuHomePhabricator

Java MPC shouldn't broadcast events to multiple streams
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

  • The problem seems to be that the Metrics client library sends the event to both streams at once, but doesn't use the correct schema name when sending them. Rather, it uses the schema name from product_metrics for both streams, so the metrics_platform event is getting rejected because it's part of a different schema.

As I understand this bug report, what's happening is multiple streams that use divergent schemas are defined as listening to the same event. Currently, the Java MPC broadcasts events – it will submit an event to any stream that has declared interest in it – whereas the JS and PHP MPCs don't.

To fix this we could:

  1. Remove the android.metrics_platform.* stream definitions
  2. Patch the Java MPC to not broadcast events and deploy a new version of the Android app that uses it

AIUI 1 is preferable but might be blocked because we still want to collect data on the android.metrics_platform.* streams.

Acceptance Criteria

Required

  • Unit/Integration tests
  • Documentation
  • Passed QA?

Event Timeline

phuedx renamed this task from Java MPC uses incorrect schema ID when batching events to Java MPC shouldn't broadcast events to multiple streams.Jan 3 2024, 9:10 AM

Change 988714 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/mediawiki-config@master] Remove android.metrics_platform.* stream definitions

https://gerrit.wikimedia.org/r/988714

Change 988714 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove android.metrics_platform.* stream definitions

https://gerrit.wikimedia.org/r/988714

Mentioned in SAL (#wikimedia-operations) [2024-01-08T21:07:05Z] <cjming@deploy2002> Started scap: Backport for [[gerrit:988714|Remove android.metrics_platform.* stream definitions (T354199)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-08T21:08:33Z] <cjming@deploy2002> cjming: Backport for [[gerrit:988714|Remove android.metrics_platform.* stream definitions (T354199)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-08T21:15:22Z] <cjming@deploy2002> Finished scap: Backport for [[gerrit:988714|Remove android.metrics_platform.* stream definitions (T354199)]] (duration: 08m 17s)

opted to remove android.metrics_platform.* stream definitions from prod since they were collecting data based on monoschema and afaik, no one cares about this data

these 4 stream configs removed here were replaced by https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/980963

cjming set the point value for this task to 2.Jan 10 2024, 6:58 AM