Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Refactor the way we set outlier #11634

Merged
merged 13 commits into from
Jan 5, 2022
Merged

Commits on Dec 22, 2021

  1. FederationClient.backfill: stop flagging events as outliers

    Events returned by `backfill` should not be flagged as outliers.
    
    Fixes:
    
    ```
    AssertionError: null
      File "synapse/handlers/federation.py", line 313, in try_backfill
        dom, room_id, limit=100, extremities=extremities
      File "synapse/handlers/federation_event.py", line 517, in backfill
        await self._process_pulled_events(dest, events, backfilled=True)
      File "synapse/handlers/federation_event.py", line 642, in _process_pulled_events
        await self._process_pulled_event(origin, ev, backfilled=backfilled)
      File "synapse/handlers/federation_event.py", line 669, in _process_pulled_event
        assert not event.internal_metadata.is_outlier()
    ```
    
    See https://sentry.matrix.org/sentry/synapse-matrixorg/issues/231992
    
    Fixes #8894.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    7bc58b9 View commit details
    Browse the repository at this point in the history
  2. _auth_and_persist_outliers: mark persisted events as outliers

    Mark any events that get persisted via `_auth_and_persist_outliers` as, well,
    outliers.
    
    Currently this will be a no-op as everything will already be flagged as an
    outlier, but I'm going to change that.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    44fc789 View commit details
    Browse the repository at this point in the history
  3. process_remote_join: stop flagging as outlier

    The events are now flagged as outliers later on, by `_auth_and_persist_outliers`.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    893eb7b View commit details
    Browse the repository at this point in the history
  4. send_join: remove outlier=True

    The events created here are returned in the result of `send_join` to
    `FederationHandler.do_invite_join`. From there they are passed into
    `FederationEventHandler.process_remote_join`, which passes them to
    `_auth_and_persist_outliers`... which sets the `outlier` flag.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    49536a0 View commit details
    Browse the repository at this point in the history
  5. get_event_auth: remove outlier=True

    stop flagging the events returned by `get_event_auth` as outliers. This method
    is only called by `_get_remote_auth_chain_for_event`, which passes the results
    into `_auth_and_persist_outliers`, which will flag them as outliers.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    7a01a9c View commit details
    Browse the repository at this point in the history
  6. _get_remote_auth_chain_for_event: remove outlier=True

    we pass all the events into `_auth_and_persist_outliers`, which will now flag
    the events as outliers.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    bca9f11 View commit details
    Browse the repository at this point in the history
  7. _check_sigs_and_hash_and_fetch: remove unused outlier parameter

    This param is now never set to True, so we can remove it.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    926cecb View commit details
    Browse the repository at this point in the history
  8. _check_sigs_and_hash_and_fetch_one: remove unused outlier param

    This is no longer set anywhere, so we can remove it.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    220c163 View commit details
    Browse the repository at this point in the history
  9. get_pdu: remove unused outlier parameter

    ... and chase it down into `get_pdu_from_destination_raw`.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    b82366d View commit details
    Browse the repository at this point in the history
  10. event_from_pdu_json: remove redundant outlier param

    This is never set to `True`, so can be removed.
    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    3f9d05f View commit details
    Browse the repository at this point in the history
  11. changelog

    richvdh committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    9564243 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Configuration menu
    Copy the full SHA
    f1275c7 View commit details
    Browse the repository at this point in the history
  2. update docstring

    richvdh committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    b6417bd View commit details
    Browse the repository at this point in the history