mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
fix database/key_value/rooms/timeline events
This commit is contained in:
parent
52decf0cea
commit
5a376ceb0a
1 changed files with 5 additions and 4 deletions
|
|
@ -31,11 +31,12 @@ impl service::rooms::timeline::Data for KeyValueDatabase {
|
||||||
hash_map::Entry::Vacant(v) => {
|
hash_map::Entry::Vacant(v) => {
|
||||||
if let Some(last_count) = self
|
if let Some(last_count) = self
|
||||||
.pdus_until(sender_user, room_id, PduCount::MAX)?
|
.pdus_until(sender_user, room_id, PduCount::MAX)?
|
||||||
.find_map(|r| {
|
.find_map(|x| match x {
|
||||||
if r.is_err() {
|
Ok(x) => Some(x),
|
||||||
error!("Bad pdu in pdus_since: {:?}", r);
|
Err(error) => {
|
||||||
|
error!(%error, "Bad pdu in pdus_since");
|
||||||
|
None
|
||||||
}
|
}
|
||||||
r.ok()
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
METRICS.record_lookup(lookup, FoundIn::Database);
|
METRICS.record_lookup(lookup, FoundIn::Database);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue