Skip to main content

Module integrity

Module integrity 

Source
Expand description

Read-only integrity checks over the database.

A check walks the columns it cares about and yields a finding for every defect it sees, writing nothing. A finding describes the database as it stands, so a check run after a repair sees that repair’s work. The migrations are a caller like any other: they consume these streams and write what a finding calls for, re-deciding anything a write may have changed.

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::fmt::Display; πŸ”’
use futures::FutureExt; πŸ”’
use futures::Stream; πŸ”’
use futures::StreamExt; πŸ”’
use futures::TryFutureExt; πŸ”’
use futures::future::BoxFuture; πŸ”’
use futures::stream::unfold; πŸ”’
use ruma::OwnedRoomId; πŸ”’
use ruma::RoomId; πŸ”’
use ruma::api::error::ErrorKind; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use tuwunel_core::Err; πŸ”’
use tuwunel_core::Error; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::implement; πŸ”’
use tuwunel_core::utils::TryReadyExt; πŸ”’
use tuwunel_database::SEP; πŸ”’
pub(crate) use self::scan::ScanExt; πŸ”’
use crate::Services; πŸ”’

ModulesΒ§

account_status
Account states a foreign database keeps outside the password column.
columns
email_bindings
Email bindings a foreign database keeps in a column of its own.
forbidden_names
Existing names the configuration forbids.
joined_members
Joined members against their rooms’ current state.
media_files
The files of mediaid_file rows in the media directory.
mediaid_user
The rows of mediaid_user.
moderation
Suspensions and locks a foreign database records.
pdu_room_ids
The room_id of stored events.
readreceiptid_readreceipt
Leftover rows in readreceiptid_readreceipt.
redactions
Redactions a foreign database applied without recording them.
referencedevents
relatesto_typed
The relation index relatesto_typed.
roomid_tscount_pducount
The timestamp index roomid_tscount_pducount.
roomuserid_joined
The keys of roomuserid_joined.
scan πŸ”’
schema
short_ids πŸ”’
Short event and state key ids, and the residue their damage leaves.
thread_summaries
The thread summaries stored on thread roots.
threadrootid_latestcount
The thread pointers in threadrootid_latestcount.
token_expiry
Access-token expiries a foreign database keeps in a column of its own.
userid_password
Hashed sentinels in userid_password.
useridprofilekey_value
The values of useridprofilekey_value.
userroomid_highlightcount
The keys of userroomid_highlightcount.

StructsΒ§

Check
One registered check.
Summary
What one run of a check found.

StaticsΒ§

CHECKS πŸ”’
Every check, in the order a whole run takes them.

TraitsΒ§

Report
A finding of any check.

FunctionsΒ§

answer πŸ”’
checks
Iterates over every registered check.
find
Finds the check registered under a name.
leading_json πŸ”’
Decodes the JSON object a stored row holds, as a release build’s database decoder reads it.
leading_record πŸ”’
Splits off the leading record of a stored key or value, as a release build decodes a lone string from it.
per_room πŸ”’
Pairs each row naming a room with what resolve answers for that room, asking once for each run of consecutive rows in one room.
tally πŸ”’
undecodable πŸ”’
Whether a failed read found its data but could not decode it.
undecodable_as πŸ”’
Answers damage for a failed read that found its data but could not decode it, and keeps any other failure.

Type AliasesΒ§

Answered πŸ”’
Row πŸ”’
Walk πŸ”’