delete pointless bad_query_ratelimiter harming e2ee performance
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
5d51adc29d
commit
3e64a5c907
2 changed files with 5 additions and 54 deletions
|
@ -21,7 +21,6 @@ pub struct Service {
|
|||
pub config: Config,
|
||||
jwt_decoding_key: Option<jsonwebtoken::DecodingKey>,
|
||||
pub bad_event_ratelimiter: Arc<RwLock<HashMap<OwnedEventId, RateLimitState>>>,
|
||||
pub bad_query_ratelimiter: Arc<RwLock<HashMap<OwnedServerName, RateLimitState>>>,
|
||||
pub stateres_mutex: Arc<Mutex<()>>,
|
||||
pub server_user: OwnedUserId,
|
||||
pub admin_alias: OwnedRoomAliasId,
|
||||
|
@ -71,7 +70,6 @@ impl crate::Service for Service {
|
|||
config: config.clone(),
|
||||
jwt_decoding_key,
|
||||
bad_event_ratelimiter: Arc::new(RwLock::new(HashMap::new())),
|
||||
bad_query_ratelimiter: Arc::new(RwLock::new(HashMap::new())),
|
||||
stateres_mutex: Arc::new(Mutex::new(())),
|
||||
admin_alias: RoomAliasId::parse(format!("#admins:{}", &config.server_name))
|
||||
.expect("#admins:server_name is valid alias name"),
|
||||
|
@ -100,13 +98,6 @@ impl crate::Service for Service {
|
|||
.len();
|
||||
writeln!(out, "bad_event_ratelimiter: {bad_event_ratelimiter}")?;
|
||||
|
||||
let bad_query_ratelimiter = self
|
||||
.bad_query_ratelimiter
|
||||
.read()
|
||||
.expect("locked for reading")
|
||||
.len();
|
||||
writeln!(out, "bad_query_ratelimiter: {bad_query_ratelimiter}")?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -115,11 +106,6 @@ impl crate::Service for Service {
|
|||
.write()
|
||||
.expect("locked for writing")
|
||||
.clear();
|
||||
|
||||
self.bad_query_ratelimiter
|
||||
.write()
|
||||
.expect("locked for writing")
|
||||
.clear();
|
||||
}
|
||||
|
||||
fn name(&self) -> &str { service::make_name(std::module_path!()) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue