Skip to content
Snippets Groups Projects
  1. Nov 28, 2022
  2. Nov 25, 2022
  3. Nov 24, 2022
  4. Nov 22, 2022
  5. Nov 21, 2022
  6. Nov 18, 2022
  7. Nov 16, 2022
    • David Robertson's avatar
      Reintroduce #14376, with bugfix for monoliths (#14468) · 115f0eb2
      David Robertson authored
      
      * Add tests for StreamIdGenerator
      
      * Drive-by: annotate all defs
      
      * Revert "Revert "Remove slaved id tracker (#14376)" (#14463)"
      
      This reverts commit d63814fd, which in
      turn reverted 36097e88. This restores
      the latter.
      
      * Fix StreamIdGenerator not handling unpersisted IDs
      
      Spotted by @erikjohnston.
      
      Closes #14456.
      
      * Changelog
      
      Co-authored-by: default avatarNick Mills-Barrett <nick@fizzadar.com>
      Co-authored-by: default avatarErik Johnston <erik@matrix.org>
      Unverified
      115f0eb2
    • Andrew Morgan's avatar
    • Patrick Cloke's avatar
      Remove redundant types from comments. (#14412) · d8cc86ef
      Patrick Cloke authored
      Remove type hints from comments which have been added
      as Python type hints. This helps avoid drift between comments
      and reality, as well as removing redundant information.
      
      Also adds some missing type hints which were simple to fill in.
      Unverified
      d8cc86ef
    • Sean Quah's avatar
      Fix background updates failing to add unique indexes on receipts (#14453) · 88227700
      Sean Quah authored
      
      As part of the database migration to support threaded receipts, there is
      a possible window in between
      `73/08thread_receipts_non_null.sql.postgres` removing the original
      unique constraints on `receipts_linearized` and `receipts_graph` and the
      `reeipts_linearized_unique_index` and `receipts_graph_unique_index`
      background updates from `72/08thread_receipts.sql` completing where
      the unique constraints on `receipts_linearized` and `receipts_graph` are
      missing. Any emulated upserts on these tables must therefore be
      performed with a lock held, otherwise duplicate rows can end up in the
      tables when there are concurrent emulated upserts. Fix the missing lock.
      
      Note that emulated upserts no longer happen by default on sqlite, since
      the minimum supported version of sqlite supports native upserts by
      default now.
      
      Finally, clean up any duplicate receipts that may have crept in before
      trying to create the `receipts_graph_unique_index` and
      `receipts_linearized_unique_index` unique indexes.
      
      Signed-off-by: default avatarSean Quah <seanq@matrix.org>
      Unverified
      88227700
  8. Nov 15, 2022
  9. Nov 11, 2022
  10. Nov 09, 2022
  11. Nov 07, 2022
  12. Nov 04, 2022
  13. Nov 03, 2022
  14. Nov 01, 2022
  15. Oct 31, 2022
  16. Oct 28, 2022
  17. Oct 27, 2022
  18. Oct 26, 2022
  19. Oct 25, 2022
    • James Salter's avatar
      Unified search query syntax using the full-text search capabilities of the underlying DB. (#11635) · d902181d
      James Salter authored
      Support a unified search query syntax which leverages more of the full-text
      search of each database supported by Synapse.
      
      Supports, with the same syntax across Postgresql 11+ and Sqlite:
      
      - quoted "search terms"
      - `AND`, `OR`, `-` (negation) operators
      - Matching words based on their stem, e.g. searches for "dog" matches
        documents containing "dogs". 
      
      This is achieved by 
      
      - If on postgresql 11+, pass the user input to `websearch_to_tsquery`
      - If on sqlite, manually parse the query and transform it into the sqlite-specific
        query syntax.
      
      Note that postgresql 10, which is close to end-of-life, falls back to using
      `phraseto_tsquery`, which only supports a subset of the features.
      
      Multiple terms separated by a space are implicitly ANDed.
      
      Note that:
      
      1. There is no escaping of full-text syntax that might be supported by the database;
        e.g. `NOT`, `NEAR`, `*` in sqlite. This runs the risk that people might discover this
        as accidental functionality and depend on something we don't guarantee.
      2. English text is assumed for stemming. To support other languages, either the target
        language needs to be known at the time of indexing the message (via room metadata,
        or otherwise), or a separate index for each language supported could be created.
      
      Sqlite docs: https://www.sqlite.org/fts3.html#full_text_index_queries
      Postgres docs: https://www.postgresql.org/docs/11/textsearch-controls.html
      Unverified
      d902181d
    • Quentin Gliech's avatar
      Refactor OIDC tests to better mimic an actual OIDC provider. (#13910) · 9192d74b
      Quentin Gliech authored
      This implements a fake OIDC server, which intercepts calls to the HTTP client.
      Improves accuracy of tests by covering more internal methods.
      
      One particular example was the ID token validation, which previously mocked.
      
      This uncovered an incorrect dependency: Synapse actually requires at least
      authlib 0.15.1, not 0.14.0.
      Unverified
      9192d74b
Loading