mirror of https://github.com/mastodon/flodgatt
0acbde3eee
* Prevent Reciever from querying postgres Before this commit, the Receiver would query Postgres for the name associated with a hashtag when it encountered one not in its cache. This ensured that the Receiver never encountered a (valid) hashtag id that it couldn't handle, but caused a extra DB query and made independent sections of the code more entangled than they need to be. Now, we pass the relevant tag name to the Receiver when it first starts managing a new subscription and it adds the tag name to its cache then. * Improve module boundary/privacy * Reorganize Receiver to cut RedisStream * Fix tests for code reorganization Note that this change includes testing some private functionality by exposing it publicly in tests via conditional compilation. This doesn't expose that functionality for the benchmarks, so the benchmark tests do not currently pass without adding a few `pub use` statements. This might be worth changing later, but benchmark tests aren't part of our CI and it's not hard to change when we want to test performance. This change also cuts the benchmark tests that were benchmarking old ways Flodgatt functioned. Those were useful for comparison purposes, but have served their purpose – we've firmly moved away from the older/slower approach. * Fix Receiver for tests |
||
---|---|---|
.. | ||
config | ||
parse_client_request | ||
redis_to_client_stream | ||
err.rs | ||
lib.rs | ||
main.rs | ||
messages.rs | ||
rustfmt.toml |