Skip to content
Snippets Groups Projects
  1. Nov 17, 2020
  2. Nov 16, 2020
  3. Oct 29, 2020
    • Erik Johnston's avatar
      Add ability for access tokens to belong to one user but grant access to another user. (#8616) · f21e24ff
      Erik Johnston authored
      We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't).
      
      A future PR will add an API for creating such a token.
      
      When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
      Unverified
      f21e24ff
  4. Oct 27, 2020
  5. Oct 26, 2020
  6. Oct 22, 2020
  7. Oct 21, 2020
  8. Oct 15, 2020
  9. Oct 14, 2020
  10. Oct 13, 2020
  11. Oct 12, 2020
    • Erik Johnston's avatar
      Make event persisters periodically announce position over replication. (#8499) · 8de3703d
      Erik Johnston authored
      Currently background proccesses stream the events stream use the "minimum persisted position" (i.e. `get_current_token()`) rather than the vector clock style tokens. This is broadly fine as it doesn't matter if the background processes lag a small amount. However, in extreme cases (i.e. SyTests) where we only write to one event persister the background processes will never make progress.
      
      This PR changes it so that the `MultiWriterIDGenerator` keeps the current position of a given instance as up to date as possible (i.e using the latest token it sees if its not in the process of persisting anything), and then periodically announces that over replication. This then allows the "minimum persisted position" to advance, albeit with a small lag.
      Unverified
      8de3703d
  12. Oct 07, 2020
  13. Oct 02, 2020
    • Erik Johnston's avatar
      Add logging on startup/shutdown (#8448) · e3debf96
      Erik Johnston authored
      This is so we can tell what is going on when things are taking a while to start up.
      
      The main change here is to ensure that transactions that are created during startup get correctly logged like normal transactions.
      Unverified
      e3debf96
  14. Sep 30, 2020
    • Erik Johnston's avatar
      Make token serializing/deserializing async (#8427) · 7941372e
      Erik Johnston authored
      The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
      Unverified
      7941372e
    • Richard van der Hoff's avatar
      Rewrite BucketCollector · 6d2d42f8
      Richard van der Hoff authored
      This was a bit unweildy for what I wanted: in particular, I wanted to assign
      each measurement straight into a bucket, rather than storing an intermediate
      Counter which didn't do any bucketing at all.
      
      I've replaced it with something that is hopefully a bit easier to use.
      
      (I'm not entirely sure what the difference between a HistogramMetricFamily and
      a GaugeHistogramMetricFamily is, but given our counters can go down as well as
      up the latter *sounds* more accurate?)
      6d2d42f8
  15. Sep 29, 2020
  16. Sep 28, 2020
  17. Sep 24, 2020
    • Erik Johnston's avatar
      Fix MultiWriteIdGenerator's handling of restarts. (#8374) · f112cfe5
      Erik Johnston authored
      On startup `MultiWriteIdGenerator` fetches the maximum stream ID for
      each instance from the table and uses that as its initial "current
      position" for each writer. This is problematic as a) it involves either
      a scan of events table or an index (neither of which is ideal), and b)
      if rows are being persisted out of order elsewhere while the process
      restarts then using the maximum stream ID is not correct. This could
      theoretically lead to race conditions where e.g. events that are
      persisted out of order are not sent down sync streams.
      
      We fix this by creating a new table that tracks the current positions of
      each writer to the stream, and update it each time we finish persisting
      a new entry. This is a relatively small overhead when persisting events.
      However for the cache invalidation stream this is a much bigger relative
      overhead, so instead we note that for invalidation we don't actually
      care about reliability over restarts (as there's no caches to
      invalidate) and simply don't bother reading and writing to the new table
      in that particular case.
      Unverified
      f112cfe5
  18. Sep 23, 2020
  19. Sep 18, 2020
  20. Sep 08, 2020
  21. Sep 04, 2020
  22. Sep 02, 2020
  23. Sep 01, 2020
  24. Aug 28, 2020
  25. Aug 27, 2020
Loading