Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/cache/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,23 @@ impl<'a> ServerPart<'a> {
/// The three parts of a key that do not change between two requests.
///
/// The server, the account as the identifier the server gave back at sign-in
/// rather than the username, and the device identity from #36. 0068 promises a
/// caller that signing out removes every entry under one of these, and 0041
/// makes that set well defined without making it reachable: 0040 gives the store
/// no listing and a digest does not reverse, so the removal in #114 needs the
/// core's own record of which keys it wrote, which is the bookkeeping 0040 hands
/// to #42.
/// rather than the username, and the device identity [`crate::session::device`]
/// holds. 0068 promises a caller that signing out removes every entry under one
/// of these, and 0041 makes that set well defined without making it reachable:
/// 0040 gives the store no listing and a digest does not reverse, so the removal
/// in #114 needs the core's own record of which keys it wrote. That record is
/// the bookkeeping inside [`crate::cache::bound::TieredCache`], and it covers
/// what THIS run wrote: the index does not survive a restart, which that module
/// states of itself.
///
/// BOTH OF THOSE WERE ADDRESSES ON THE TRACKER UNTIL THIS EDIT, AND THE TWO WENT
/// WRONG IN DIFFERENT WAYS. The record of written keys was handed to #42. That
/// issue closed as completed sixteen hours before this file landed and
/// [`crate::cache::bound`] was already in the tree, so that half landed refuted,
/// which is the harder of the two states to defend. The device part read `from
/// #36` while #36 was still open and [`crate::session::device`] did not exist, so
/// that half was the best available address when it was written and went stale
/// six hours later, which is the milder. #493 is where both were found.
///
/// Thread safety, from 0009: a plain value, safe from any thread.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand All @@ -125,7 +136,7 @@ pub struct KeySpace<'a> {
pub server: ServerPart<'a>,
/// The account, as the identifier the server gave back at sign-in.
pub account: &'a str,
/// The device identity from #36.
/// The device identity, as [`crate::session::device`] holds it.
pub device: &'a str,
}

Expand Down
Loading