OXYGENHUB

Bucket stores count pack listings and kept listings apart 30644f1ecb7b

/health showed LISTs rising after the pack listing was kept (158 a
minute against 33 before), with no way to tell which prefixes they were.
The stats now count list_packs (a pack listing sent), list_kept (one
answered from the kept listing) and list (any other prefix) apart, so a
server's /health says where its listings go.

Refs #116
Author
Andy McCall @andymccall <[email protected]>
via
agent agent:claude@andymccall <[email protected]> · keyless, under your grant for changes,refs,seal · key 95629832e1b1
When
· 2026-10-18 01:44 UTC
Signature
◈ sealed by agent:claude@andymccall
Hash
30644f1ecb7b499d52f0c882211bffea40b8a2f1273a54c8faec1ff05d80d2ac
Depends on
1e0fbb47ab90 87c948720343 8d80356371c5
Depended on by
ef7d4ea6f33b
In bookmarks
carried-not-removed doctor-trust identical-sides keyless-tags main merge-remote-bookmark paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state
In tags
v0.10.0 v0.11.0 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
Edits
7 atoms, 0 tree operations, 1 file

Browse the tree at this change

modified crates/oxy-strata/src/lib.rs +15 −2
…
120 unchanged lines
121 121
    Range,
122 122
    Put,
123 123
    List,
124 +
    /// A listing of a repository's packs, sent.
125 +
    ListPacks,
126 +
    /// A listing answered from [`Listings`], not sent.
127 +
    ListKept,
124 128
    Delete,
125 129
    ReadRef,
126 130
    WriteRef,
127 131
}
128 132
129 133
impl Op {
130 -
    pub const ALL: [Op; 9] = [
134 +
    pub const ALL: [Op; 11] = [
131 135
        Op::Has,
132 136
        Op::HasMissing,
133 137
        Op::Get,
134 138
        Op::Range,
135 139
        Op::Put,
136 140
        Op::List,
141 +
        Op::ListPacks,
142 +
        Op::ListKept,
137 143
        Op::Delete,
138 144
        Op::ReadRef,
139 145
        Op::WriteRef,
…
7 unchanged lines
147 153
            Op::Range => "range",
148 154
            Op::Put => "put",
149 155
            Op::List => "list",
156 +
            Op::ListPacks => "list_packs",
157 +
            Op::ListKept => "list_kept",
150 158
            Op::Delete => "delete",
151 159
            Op::ReadRef => "read_ref",
152 160
            Op::WriteRef => "write_ref",
…
607 unchanged lines
760 768
761 769
    fn list(&self, prefix: &str) -> Result<Vec<Entry>> {
762 770
        if let Some(kept) = self.listings.get(prefix) {
771 +
            counted(Op::ListKept);
763 772
            return Ok(kept);
764 773
        }
765 774
        // Providers list by whole path segments; the asked prefix may end
…
8 unchanged lines
774 783
        let full_dir = full_dir
775 784
            .map(|d| ObjectPath::parse(&d).map_err(|e| Error::Backend(format!("{d}: {e}"))))
776 785
            .transpose()?;
777 -
        counted(Op::List);
786 +
        counted(if Listings::kept(prefix) {
787 +
            Op::ListPacks
788 +
        } else {
789 +
            Op::List
790 +
        });
778 791
        let metas: Vec<object_store::ObjectMeta> = self
779 792
            .block(self.inner.list(full_dir.as_ref()).try_collect())
780 793
            .map_err(|e| self.map(e, prefix))?;
…
244 unchanged lines