WIP: feat: stateless sync and orphan all sync tokens #1456

Draft
gamesguru wants to merge 188 commits from gamesguru/continuwuity:guru/experiment/stateless-sync-purge-sync-tokens into main
Contributor

Link to Complement Test Suite incremental diffs per commit: https://github.com/gamesguru/continuwuity/pull/17#issuecomment-3980966155


This pull request addresses !917, dropping roomsynctoken_shortstatehash via v19 RocksDB migration and allowing its space to be reclaimed via query raw compact --exhaustive. It also introduces an LRU cache and numerous other speedups.

NOTICE: This PR is ready for beta testers. Please run with log_level=INFO and report any race conditions or bugs in the development channel or in a comment here!

If you wish to review it, stay focused on what appears to be core functionality. I am still siphoning off features to other branches and deciding what can stay.


Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the [contributing guidelines][c1]:
    • My contribution follows the [code style][c2], if applicable.
    • I ran [pre-commit checks][c1pc] before opening/drafting this pull request.
    • I have [tested my contribution][c1t] (or proof-read it for documentation-only changes)
      myself, if applicable. This includes ensuring code compiles.
    • My commit messages follow the [commit message format][c1cm] and are descriptive.
    • I have written a [news fragment][n1] for this PR, if applicable
Link to Complement Test Suite incremental diffs per commit: https://github.com/gamesguru/continuwuity/pull/17#issuecomment-3980966155 ---------------------------------------------------------------- This pull request addresses !917, dropping `roomsynctoken_shortstatehash` via v19 RocksDB migration and allowing its space to be reclaimed via `query raw compact --exhaustive`. It also introduces an LRU cache and numerous other speedups. **NOTICE:** This PR is ready for beta testers. Please run with `log_level=INFO` and report any race conditions or bugs in the development channel or in a comment here! If you wish to review it, stay focused on what appears to be core functionality. I am still siphoning off features to other branches and deciding what can stay. ---------------------------------------------------------------- **Pull request checklist:** <!-- You need to complete these before your PR can be considered. If you aren't sure about some, feel free to ask for clarification in #dev:continuwuity.org. --> - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. - [x] I have written a [news fragment][n1] for this PR, if applicable
feat: stateless sync and orphan all sync tokens
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 5m44s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 31m27s
1b9987df14
Author
Contributor

I am running a modified/tweaked version of this branch on a development account. I have joined Matrix HQ and many large or allegedly or reportedly "broken" rooms without ill-effect.

I believe I have fixed some things by brute force that were previously assumed to be solely under the purview of transactions... (Although, it seems I have also introduced some more caching issues. But I would personally prefer to clear my cache and get into rooms than never get into them at all).

Briefly, I had issues on this branch, which caused the accumulation of eventid_outlierpdu and possibly others? (See DB files output below log).

Screenshot_20260227_085255-2

Sample logs:

api::client::sync::v3::joined: fetch_shortstatehashes: room=!fo2YUTHHGEPw7SfF0w_FDVIUKk6sAPVhcLbS5XW8OlY last_count=Some(538690) current=476878 last_end=Some(476878)
api::client::sync::v3::joined: fetch_shortstatehashes: room=!eBgZCVRnRRkKchiYzS:monero.social last_count=Some(538690) current=531463 last_end=Some(531463)
api::client::sync::v3::joined: fetch_shortstatehashes: room=!da26JtAjE6APGLnX8ncWsvc-skF2KQZ9Nw_MbNpYD2k last_count=Some(538690) current=524692 last_end=Some(524692)
service::rooms::timeline: next_shortstatehash: after=Normal(538690) next_count=Normal(538707) room=!xUW4PpAe1CmThA3r2wI8IrgwwsK006-zqWdJCljpd10
service::rooms::timeline: next_shortstatehash: shorteventid=538703
service::rooms::state: get_shortstatehash: shorteventid=538703 result=Ok(525087)
service::rooms::timeline: next_shortstatehash: result=Ok(525087)
api::client::sync::v3::joined: fetch_shortstatehashes: room=!xUW4PpAe1CmThA3r2wI8IrgwwsK006-zqWdJCljpd10 last_count=Some(538690) current=517877 last_end=Some(525087)
api::client::sync::v3::joined: fetch_shortstatehashes: room=!sM2LwqNHGQOgLf35gqxPMy9D7oYde2q9ADg8HPBM3kE last_count=Some(538690) current=480334 last_end=Some(480334)
api::client::sync::v3::joined: fetch_shortstatehashes: room=!nmYLVkF8x0OSAyicrN:luckyskies.pet last_count=Some(538690) current=523224 last_end=Some(523224)

DB files:

uwu> debug database-files 
│lev│    sst    │ keys  │dels │  size  │             column             │
├───┼───────────┼───────┼─────┼────────┼────────────────────────────────┤
│  0│/000185.sst│   209+│   0-│   32343│servername_destination          │
│  0│/000186.sst│   336+│   0-│   43999│servername_override             │
│  1│/000198.sst│    17+│   0-│    1362│roomsynctoken_shortstatehash    │
│  0│/000299.sst│   631+│   0-│   95702│servername_destination          │
│  0│/000300.sst│   897+│   0-│  115720│servername_override             │
│  0│/000416.sst│    12+│   0-│    3157│servername_destination          │
│  0│/000417.sst│    12+│   0-│    2760│servername_override             │
│  0│/000489.sst│   852+│ 170-│  108099│servername_destination          │
│  0│/000491.sst│  1245+│ 233-│  136658│servername_override             │
│  0│/000608.sst│     9+│   0-│    2506│servername_destination          │
│  0│/000610.sst│    14+│   0-│    2958│servername_override             │
│  0│/000674.sst│   842+│ 835-│   23952│servername_destination          │
│  0│/000675.sst│  1222+│1215-│   35933│servername_override             │
│  0│/000766.sst│   464+│   0-│   71785│servername_destination          │
│  0│/000797.sst│   685+│   0-│   88833│servername_override             │
│  0│/000940.sst│   666+│   0-│  100935│servername_destination          │
│  0│/000942.sst│  1023+│   0-│  131819│servername_override             │
│  0│/001076.sst│    16+│   0-│    3671│servername_destination          │
│  0│/001078.sst│    23+│   0-│    4185│servername_override             │
│  0│/001128.sst│     7+│   0-│    2256│servername_destination          │
│  0│/001130.sst│     8+│   0-│    2240│servername_override             │
│  0│/001257.sst│     9+│   0-│    2529│servername_destination          │
│  0│/001261.sst│    13+│   0-│    2816│servername_override             │
│  0│/001398.sst│     7+│   0-│    2320│servername_destination          │
│  0│/001399.sst│    12+│   0-│    2719│servername_override             │
│  0│/001496.sst│     4+│   0-│    1842│servername_destination          │
│  0│/001497.sst│     5+│   0-│    1855│servername_override             │
│  0│/001526.sst│     1+│   0-│    1354│servername_destination          │
│  0│/001528.sst│     2+│   0-│    1451│servername_override             │
│  0│/001687.sst│     4+│   0-│    1776│servername_destination          │
│  0│/001689.sst│     8+│   0-│    2179│servername_override             │
│  0│/001774.sst│     8+│   0-│    2360│servername_destination          │
│  0│/001777.sst│     7+│   0-│    2111│servername_override             │
│  0│/001869.sst│    11+│   0-│    2756│servername_destination          │
│  0│/001870.sst│    14+│   0-│    2939│servername_override             │
│  0│/002018.sst│     7+│   0-│    2230│servername_destination          │
│  0│/002020.sst│    10+│   0-│    2418│servername_override             │
│  0│/002160.sst│   292+│   0-│   44471│servername_destination          │
│  0│/002164.sst│   284+│   0-│   37262│servername_override             │
│  0│/002492.sst│   666+│   0-│  100164│servername_destination          │
│  0│/002493.sst│   733+│   0-│   93835│servername_override             │
│  0│/002672.sst│  2183+│1489-│  144622│servername_destination          │
│  0│/002673.sst│  2857+│1816-│  184376│servername_override             │
│  1│/002758.sst│ 32257+│   0-│  244860│roomsynctoken_shortstatehash    │
│  0│/002812.sst│   427+│   0-│   64484│servername_destination          │
│  0│/002815.sst│   506+│   0-│   65058│servername_override             │
│  0│/002946.sst│  5174+│   0-│  192217│roomsynctoken_shortstatehash    │
│  0│/002956.sst│     7+│   0-│    2294│servername_destination          │
│  0│/002958.sst│    32+│   0-│    5226│servername_override             │
│  0│/003144.sst│    12+│   0-│    3021│servername_destination          │
│  0│/003147.sst│    12+│   0-│    2701│servername_override             │
│  0│/003237.sst│    31+│   0-│    5835│servername_destination          │
│  0│/003240.sst│    48+│   0-│    7310│servername_override             │
│  0│/003353.sst│   220+│   0-│   34005│servername_destination          │
│  0│/003356.sst│   227+│   0-│   30165│servername_override             │
│  0│/003549.sst│    12+│   0-│    2964│servername_destination          │
│  0│/003550.sst│    18+│   0-│    3442│servername_override             │
│  0│/003629.sst│    29+│   0-│    5477│servername_destination          │
│  0│/003631.sst│    32+│   0-│    5284│servername_override             │
│  0│/003748.sst│   100+│   0-│   16511│servername_destination          │
│  0│/003750.sst│   159+│   0-│   21664│servername_override             │
│  0│/003885.sst│    61+│   0-│   10414│servername_destination          │
│  0│/003890.sst│    81+│   0-│   11478│servername_override             │
│  0│/004009.sst│     6+│   0-│    2088│servername_destination          │
│  0│/004010.sst│     8+│   0-│    2177│servername_override             │
│  0│/004162.sst│    11+│   0-│    2892│servername_destination          │
│  0│/004164.sst│    16+│   0-│    3332│servername_override             │
│  0│/004253.sst│  1612+│1595-│   45356│servername_destination          │
│  0│/004255.sst│  2185+│2165-│   63975│servername_override             │
│  0│/004388.sst│  1205+│   0-│  181050│servername_destination          │
│  0│/004401.sst│  1548+│   0-│  198666│servername_override             │
│  0│/004532.sst│  1228+│ 256-│  153079│servername_destination          │
│  0│/004539.sst│  1577+│ 283-│  173719│servername_override             │
│  0│/004575.sst│     1+│   0-│    1353│servername_destination          │
│  0│/004636.sst│     3+│   0-│    1599│servername_destination          │
│  0│/004637.sst│     2+│   0-│    1423│servername_override             │
│  0│/004770.sst│   213+│   0-│   33086│servername_destination          │
│  0│/004774.sst│   334+│   0-│   43463│servername_override             │
│  0│/005021.sst│     5+│   0-│    1853│servername_override             │
│  0│/005033.sst│     5+│   0-│    1986│servername_destination          │
│  0│/005120.sst│     3+│   0-│    1645│servername_destination          │
│  0│/005146.sst│     5+│   0-│    1853│servername_override             │
│  0│/005453.sst│     1+│   0-│    1430│servername_destination          │
│  0│/005454.sst│     2+│   0-│    1517│servername_override             │
│  0│/005615.sst│     2+│   0-│    1511│servername_destination          │
│  0│/005644.sst│     2+│   0-│    1430│servername_override             │
│  0│/005803.sst│     1+│   0-│    1446│servername_destination          │
│  0│/005804.sst│     1+│   0-│    1387│servername_override             │
│  0│/005962.sst│    40+│   0-│    7114│servername_destination          │
│  0│/005985.sst│    59+│   0-│    8687│servername_override             │
│  0│/006097.sst│   595+│   0-│   93020│servername_destination          │
│  0│/006172.sst│   746+│   0-│   98055│servername_override             │
│  0│/006239.sst│     1+│   0-│    1377│servername_destination          │
│  0│/006456.sst│   338+│   0-│   44659│servername_override             │
│  0│/006464.sst│   222+│   0-│   35460│servername_destination          │
│  0│/006548.sst│  2879+│   0-│  371036│servername_override             │
│  0│/006550.sst│  2626+│   0-│  400869│servername_destination          │
│  0│/007083.sst│   271+│   0-│   43005│servername_destination          │
│  0│/007085.sst│   399+│   0-│   52162│servername_override             │
│  0│/007365.sst│  1084+│   0-│  163664│servername_destination          │
│  0│/007366.sst│  1029+│   0-│  131814│servername_override             │
│  0│/007566.sst│  6040+│6040-│  166176│servername_destination          │
│  0│/007568.sst│  7095+│7095-│  202173│servername_override             │
│  0│/007680.sst│   433+│   0-│   66044│servername_destination          │
│  0│/007682.sst│   394+│   0-│   51449│servername_override             │
│  0│/007881.sst│     8+│   0-│    2469│servername_destination          │
│  0│/007883.sst│     9+│   0-│    2395│servername_override             │
│  5│/008110.sst│     1+│   0-│    2087│eventid_outlierpdu              │
│  0│/008166.sst│   651+│   0-│   98675│servername_destination          │
│  0│/008167.sst│  1018+│   0-│  131205│servername_override             │
│  0│/008374.sst│     7+│   0-│    2227│servername_destination          │
│  0│/008375.sst│     8+│   0-│    2208│servername_override             │
│  0│/008450.sst│   312+│   0-│   48966│servername_destination          │
│  0│/008452.sst│   493+│   0-│   64483│servername_override             │
│  1│/008518.sst│     1+│   0-│    1228│alias_roomid                    │
│  1│/008519.sst│     1+│   0-│    1217│alias_userid                    │
│  1│/008520.sst│     1+│   0-│    1327│aliasid_alias                   │
│  3│/008575.sst│ 42201+│   0-│ 2163609│eventid_shorteventid            │
│  1│/008588.sst│    28+│   0-│   10998│keyid_key                       │
│  1│/008599.sst│    50+│   0-│   12055│onetimekeyid_onetimekeys        │
│  1│/008604.sst│    18+│   0-│    9366│pduid_pdu                       │
│  1│/008626.sst│  7141+│   0-│  201101│roomserverids                   │
│  1│/008637.sst│   179+│   0-│   10063│roomuserid_lastprivatereadupdate│
│  1│/008641.sst│   179+│   0-│   10053│roomuserid_privateread          │
│  1│/008648.sst│   589+│   0-│   55705│servercurrentevent_data         │
│  1│/008653.sst│  7141+│   0-│  318073│serverroomids                   │
│  5│/008661.sst│196177+│   0-│12580453│shorteventid_eventid            │
│  1│/008664.sst│    15+│   0-│    1319│shorteventid_shortstatehash     │
│  1│/008665.sst│  1601+│   0-│   12978│shorteventid_shortstatehash     │
│  1│/008669.sst│   285+│   0-│  931407│shortstatehash_statediff        │
│  5│/008672.sst│ 70887+│   0-│ 1941917│shortstatekey_statekey          │
│  1│/008680.sst│   602+│   0-│    6978│tofrom_relation                 │
│  1│/008681.sst│     1+│   0-│    1312│token_userdeviceid              │
│  1│/008684.sst│   183+│   0-│    4358│tokenids                        │
│  1│/008686.sst│     1+│   0-│    1336│url_previews                    │
│  1│/008690.sst│     1+│   0-│    1310│userdeviceid_token              │
│  1│/008691.sst│     4+│   0-│    1739│userdevicesessionid_uiaainfo    │
│  1│/008692.sst│    20+│   0-│    2742│userdevicetxnid_response        │
│  1│/008693.sst│     1+│   0-│    1358│userfilterid_filter             │
│  1│/008694.sst│     1+│   0-│    1295│userid_avatarurl                │
│  1│/008695.sst│     1+│   0-│    1257│userid_devicelistversion        │
│  1│/008696.sst│     1+│   0-│    1258│userid_displayname              │
│  1│/008697.sst│     1+│   0-│    1260│userid_lastonetimekeyupdate     │
│  1│/008699.sst│    16+│   0-│    2491│userid_masterkeyid              │
│  1│/008702.sst│     1+│   0-│    1258│userid_origin                   │
│  1│/008707.sst│  2299+│   0-│   68483│userid_presenceid               │
│  1│/008710.sst│     7+│   0-│    1796│userid_selfsigningkeyid         │
│  4│/008729.sst│ 14576+│   0-│ 5867060│userroomid_leftstate            │
│  4│/008731.sst│ 17625+│   0-│ 7160740│userroomid_leftstate            │
│  4│/008732.sst│  1722+│   0-│  693382│userroomid_leftstate            │
│  0│/008746.sst│  1494+│1261-│   69450│servername_destination          │
│  0│/008748.sst│  2059+│1659-│   98316│servername_override             │
│  0│/008947.sst│  1041+│   0-│  157166│servername_destination          │
│  0│/008950.sst│  1042+│   0-│  134139│servername_override             │
│  0│/008965.sst│     2+│   0-│    1434│userid_selfsigningkeyid         │
│  0│/009084.sst│     1+│   0-│    1374│servername_destination          │
│  1│/009129.sst│    10+│   0-│    1278│shorteventid_shortstatehash     │
│  2│/009170.sst│ 32457+│   0-│ 2164005│eventid_shorteventid            │
│  2│/009172.sst│ 32457+│   0-│ 2164125│eventid_shorteventid            │
│  0│/009266.sst│   106+│   0-│   17213│servername_destination          │
│  0│/009281.sst│   135+│   0-│   18258│servername_override             │
│  1│/009295.sst│     3+│   0-│    1243│shorteventid_shortstatehash     │
│  6│/009308.sst│    26+│   0-│    2630│roomid_shortroomid              │
│  0│/009433.sst│     1+│   0-│    1349│servername_destination          │
│  0│/009434.sst│     1+│   0-│    1327│servername_override             │
│  5│/009483.sst│ 28350+│   0-│17024975│eventid_outlierpdu              │
│  5│/009518.sst│ 25231+│   0-│15236342│eventid_outlierpdu              │
│  6│/009522.sst│ 28599+│   0-│17026729│eventid_outlierpdu              │
│  6│/009523.sst│  2755+│   0-│ 1638772│eventid_outlierpdu              │
│  0│/009643.sst│   135+│   0-│   18311│servername_override             │
│  0│/009644.sst│    87+│   0-│   14340│servername_destination          │
│  0│/009737.sst│  2492+│2424-│   77630│servername_override             │
│  0│/009774.sst│  1967+│1930-│   58002│servername_destination          │
│  0│/009812.sst│    42+│   0-│    6531│servername_override             │
│  0│/009828.sst│    18+│   0-│    3928│servername_destination          │
│  0│/009906.sst│  1541+│ 888-│  108704│servername_override             │
│  1│/009971.sst│     6+│   0-│    1265│shorteventid_shortstatehash     │
│  2│/010008.sst│  3564+│1353-│ 2111703│userroomid_leftstate            │
│  2│/010011.sst│  3577+│1368-│ 2109052│userroomid_leftstate            │
│  1│/010014.sst│  9159+│   0-│  147061│servernameevent_data            │
│  1│/010022.sst│    12+│   0-│    1289│shorteventid_shortstatehash     │
│  1│/010029.sst│     6+│   0-│    1246│shorteventid_shortstatehash     │
│  4│/010033.sst│   891+│   1-│  831776│eventid_outlierpdu              │
│  4│/010060.sst│   868+│   1-│  821683│eventid_outlierpdu              │
│  4│/010071.sst│  1397+│   1-│ 1316636│eventid_outlierpdu              │
│  5│/010078.sst│ 27973+│   0-│17024171│eventid_outlierpdu              │
│  5│/010079.sst│  9976+│   0-│ 6082131│eventid_outlierpdu              │
│  4│/010081.sst│   455+│   0-│  453585│eventid_outlierpdu              │
│  4│/010084.sst│  3914+│  12-│ 3763862│eventid_outlierpdu              │
│  5│/010086.sst│ 27978+│   0-│17024059│eventid_outlierpdu              │
│  5│/010087.sst│ 16435+│   0-│ 9833823│eventid_outlierpdu              │
│  5│/010089.sst│ 27569+│   0-│16865186│eventid_outlierpdu              │
│  4│/010091.sst│  1949+│   4-│ 1932572│eventid_outlierpdu              │
│  4│/010092.sst│  1328+│   4-│ 1267453│eventid_outlierpdu              │
│  5│/010093.sst│ 27917+│   0-│17025325│eventid_outlierpdu              │
│  5│/010094.sst│  8239+│   0-│ 5008337│eventid_outlierpdu              │
│  3│/010097.sst│  1304+│   3-│ 1271135│eventid_outlierpdu              │
│  4│/010098.sst│  1021+│   3-│  950510│eventid_outlierpdu              │
│  4│/010099.sst│   442+│   1-│  398116│eventid_outlierpdu              │
│  5│/010100.sst│ 27971+│   0-│17024784│eventid_outlierpdu              │
│  5│/010101.sst│  6695+│   0-│ 4037267│eventid_outlierpdu              │
│  3│/010102.sst│  1423+│   2-│ 1328832│eventid_outlierpdu              │
│  0│/010111.sst│  1393+│ 662-│  128607│servername_destination          │
│  1│/010117.sst│     2+│   0-│    1234│shorteventid_shortstatehash     │
│  0│/010178.sst│   668+│   0-│   85953│servername_override             │
│  0│/010199.sst│   202+│   0-│   31688│servername_destination          │
│  0│/010252.sst│    18+│   0-│    4041│servername_destination          │
│  0│/010260.sst│     1+│   0-│    1370│servername_override             │
│  6│/010299.sst│    27+│   0-│    2635│roomid_shortstatehash           │
│  0│/010351.sst│    13+│   0-│    3195│servername_destination          │
│  0│/010357.sst│     8+│   0-│    2233│servername_override             │
│  2│/010384.sst│  1760+│  59-│ 2117275│eventid_outlierpdu              │
│  0│/010447.sst│     3+│   0-│    1652│servername_destination          │
│  0│/010452.sst│     4+│   0-│    1684│servername_override             │
│  2│/010470.sst│  1430+│  22-│ 2117096│eventid_outlierpdu              │
│  1│/010479.sst│ 52146+│   0-│  803634│statekey_shortstatekey          │
│  1│/010480.sst│ 33022+│   0-│  525241│statekey_shortstatekey          │
│  1│/010481.sst│   487+│   0-│   10889│roomuserid_leftcount            │
│  1│/010488.sst│  7816+│   0-│  671722│server_signingkeys              │
│  1│/010491.sst│ 14164+│   0-│  170312│userid_origin                   │
│  1│/010492.sst│ 70658+│   0-│  858855│userid_origin                   │
│  1│/010497.sst│    34+│   0-│    1425│shorteventid_shortstatehash     │
│  1│/010503.sst│ 46448+│   0-│  961883│roomuseroncejoinedids           │
│  1│/010504.sst│ 16868+│   0-│  352228│roomuseroncejoinedids           │
│  2│/010511.sst│  2368+│1055-│ 1272248│userroomid_leftstate            │
│  1│/010512.sst│ 84823+│   0-│  990252│userid_password                 │
│  1│/010527.sst│     3+│   0-│    1241│shorteventid_shortstatehash     │
│  6│/010528.sst│ 62963+│   0-│ 1767868│roomuserid_joined               │
│  3│/010532.sst│  1370+│   0-│ 1310134│eventid_outlierpdu              │
│  4│/010533.sst│  1659+│   4-│ 1588905│eventid_outlierpdu              │
│  4│/010534.sst│   983+│   2-│  908838│eventid_outlierpdu              │
│  3│/010535.sst│   349+│   0-│  354884│eventid_outlierpdu              │
│  5│/010536.sst│ 22150+│   0-│17022442│eventid_outlierpdu              │
│  5│/010537.sst│ 20122+│   0-│15439820│eventid_outlierpdu              │
│  3│/010538.sst│  1371+│   1-│ 1295498│eventid_outlierpdu              │
│  4│/010539.sst│  2048+│   3-│ 1954712│eventid_outlierpdu              │
│  0│/010581.sst│   403+│   0-│   61302│servername_destination          │
│  0│/010591.sst│   394+│   0-│   51376│servername_override             │
│  1│/010656.sst│     2+│   0-│    1233│shorteventid_shortstatehash     │
│  2│/010658.sst│  1618+│  64-│ 1692615│eventid_outlierpdu              │
│  3│/010660.sst│  1953+│  34-│ 1678698│eventid_outlierpdu              │
│  4│/010661.sst│  5791+│  17-│ 5536446│eventid_outlierpdu              │
│  4│/010662.sst│  1287+│   1-│ 1203633│eventid_outlierpdu              │
│  1│/010711.sst│ 48684+│   0-│ 1014448│userroomid_joined               │
│  1│/010712.sst│ 14902+│   0-│  313635│userroomid_joined               │
│  2│/010719.sst│  3217+│1492-│ 1666213│userroomid_leftstate            │
│  0│/010791.sst│  1391+│1369-│   40688│servername_destination          │
│  0│/010796.sst│  1748+│1722-│   52908│servername_override             │
│  1│/010812.sst│     8+│   0-│    1266│shorteventid_shortstatehash     │
│  0│/010858.sst│     1+│   0-│    1379│servername_destination          │
│  0│/010860.sst│     2+│   0-│    1444│servername_override             │
│  5│/010894.sst│     7+│   0-│    1688│roomid_shortroomid              │
│  1│/010906.sst│    17+│   0-│    1299│shorteventid_shortstatehash     │
│  6│/010923.sst│  1209+│   0-│   70041│mediaid_file                    │
│  6│/010926.sst│  1008+│   0-│   53896│mediaid_user                    │
│  6│/010936.sst│     5+│   0-│    1456│roomusertype_roomuserdataid     │
│  0│/010989.sst│  1770+│   0-│  265975│servername_destination          │
│  0│/010991.sst│  2072+│   0-│  265734│servername_override             │
│  1│/011022.sst│     1+│   0-│    1223│shorteventid_shortstatehash     │
│  1│/011043.sst│  1786+│ 226-│ 1469042│userroomid_leftstate            │
│  1│/011044.sst│  3684+│1439-│ 2111709│userroomid_leftstate            │
│  1│/011045.sst│  1980+│1187-│  769800│userroomid_leftstate            │
│  1│/011046.sst│   993+│  67-│  880739│userroomid_leftstate            │
│  1│/011047.sst│  1929+│1267-│  665442│userroomid_leftstate            │
│  1│/011048.sst│   204+│ 128-│   75068│userroomid_leftstate            │
│  1│/011072.sst│   455+│   0-│    6879│keychangeid_userid              │
│  0│/011077.sst│     6+│   0-│    4400│keyid_key                       │
│  0│/011078.sst│    91+│   0-│   21983│server_signingkeys              │
│  0│/011082.sst│     4+│   0-│    1599│userid_masterkeyid              │
│  1│/011090.sst│  2110+│   0-│ 2109638│pduid_pdu                       │
│  1│/011091.sst│  2708+│   0-│ 1253586│pduid_pdu                       │
│  0│/011149.sst│  1271+│   9-│   87503│serverroomids                   │
│  0│/011154.sst│    13+│   0-│    3074│servername_destination          │
│  0│/011157.sst│    27+│   0-│    4637│servername_override             │
│  1│/011172.sst│    45+│   0-│    1546│shorteventid_shortstatehash     │
│  1│/011174.sst│   418+│   0-│   12196│userroomid_highlightcount       │
│  1│/011182.sst│   111+│   0-│   15725│url_previews                    │
│  1│/011183.sst│   209+│   0-│    6818│userroomid_notificationcount    │
│  6│/011192.sst│    12+│   0-│    1667│global                          │
│  1│/011228.sst│  1961+│   0-│   78904│referencedevents                │
│  1│/011239.sst│ 46972+│   0-│  821278│roomuserid_leftcount            │
│  6│/011251.sst│  2927+│   0-│   64988│servername_educount             │
│  0│/011269.sst│  1271+│   9-│   94481│roomserverids                   │
│  0│/011277.sst│   203+│   0-│   31585│servername_destination          │
│  0│/011279.sst│   287+│   0-│   37591│servername_override             │
│  4│/011282.sst│ 33949+│   0-│ 2223697│shorteventid_eventid            │
│  0│/011284.sst│    74+│   0-│    3356│shorteventid_shortstatehash     │
│  1│/011287.sst│    21+│   0-│    1391│shorteventid_shortstatehash     │
│  0│/011288.sst│   976+│   0-│   43155│userid_presenceid               │
│  0│/011290.sst│    54+│   0-│    6005│userroomid_highlightcount       │
│  0│/011294.sst│     6+│   0-│    1751│keychangeid_userid              │
│  0│/011316.sst│    30+│   0-│    3918│userroomid_notificationcount    │
│  0│/011320.sst│     1+│   0-│    1198│global                          │
│  0│/011324.sst│    90+│   0-│   10630│referencedevents                │
│  0│/011328.sst│  1654+│   0-│   58343│servername_educount             │
│  0│/011335.sst│     3+│   3-│    1406│roomid_inviteviaservers         │
│  0│/011339.sst│    76+│   0-│    3410│tofrom_relation                 │
│  0│/011340.sst│    61+│   0-│  613808│shortstatehash_statediff        │
│  1│/011341.sst│   293+│   0-│   12897│statehash_shortstatehash        │
│  1│/011342.sst│ 13808+│   0-│  920609│eventid_shorteventid            │
│  1│/011343.sst│ 32457+│   0-│ 2164401│eventid_shorteventid            │
│  1│/011344.sst│ 32457+│   0-│ 2164365│eventid_shorteventid            │
│  1│/011345.sst│ 27452+│   0-│ 1830678│eventid_shorteventid            │
│  1│/011346.sst│ 14032+│   0-│  936363│eventid_shorteventid            │
│  0│/011347.sst│   182+│   0-│  163416│pduid_pdu                       │
│  0│/011349.sst│   193+│ 127-│   17385│roomuserid_leftcount            │
│  1│/011350.sst│ 24783+│   0-│ 1879494│shorteventid_authchain          │
│  1│/011351.sst│ 24044+│   0-│ 2116359│shorteventid_authchain          │
│  1│/011352.sst│   926+│   0-│  308498│shorteventid_authchain          │
│  6│/011353.sst│     1+│   0-│    1399│userdeviceid_metadata           │
│  6│/011354.sst│    34+│   0-│    4845│roomid_pduleaves                │
│  0│/011355.sst│    63+│   0-│    7086│roomuserid_lastprivatereadupdate│
│  0│/011356.sst│    63+│   0-│    7076│roomuserid_privateread          │
│  1│/011357.sst│  1518+│ 214-│ 1253655│eventid_outlierpdu              │
│  1│/011358.sst│  2650+│ 250-│ 2121460│eventid_outlierpdu              │
│  1│/011359.sst│  2656+│ 253-│ 2120969│eventid_outlierpdu              │
│  1│/011360.sst│  2345+│ 212-│ 1862972│eventid_outlierpdu              │
│  1│/011361.sst│   845+│  79-│  678525│eventid_outlierpdu              │
│  1│/011362.sst│  5018+│   0-│  307784│eventid_pduid                   │
│  4│/011363.sst│ 14685+│   0-│  879213│shortstatekey_statekey          │
│  0│/011364.sst│   404+│   0-│   24373│statekey_shortstatekey          │
│  6│/011365.sst│  2497+│   0-│  185568│presenceid_presence             │
│  1│/011366.sst│  1077+│   0-│   88958│readreceiptid_readreceipt       │
│  6│/011367.sst│    32+│   0-│    2766│roomuserid_invitecount          │
│  5│/011368.sst│  1996+│ 880-│   90398│roomuserid_joined               │
│  6│/011371.sst│    32+│   0-│    2764│roomuserid_knockedcount         │
│  6│/011374.sst│    32+│   0-│    7833│userroomid_invitestate          │
│  0│/011377.sst│   655+│ 161-│   51415│userroomid_joined               │
│  0│/011380.sst│   281+│ 209-│   89434│userroomid_leftstate            │
│  6│/011389.sst│    32+│   0-│    3389│userroomid_invitesender         │
│  6│/011390.sst│    32+│   0-│    2772│roomid_invitedcount             │
│  6│/011391.sst│    32+│   0-│    2848│roomid_joinedcount              │
│  5│/011396.sst│    12+│   0-│    2007│roomid_shortstatehash           │
│  6│/011397.sst│   294+│   0-│   19462│lazyloadedids                   │
│  6│/011400.sst│     5+│   0-│    2925│roomuserdataid_accountdata      │
│  0│/011409.sst│     1+│   0-│    1355│roomusertype_roomuserdataid     │
│  0│/011411.sst│   774+│   0-│   55848│roomuseroncejoinedids           │
│  0│/011412.sst│   482+│   0-│   21823│userid_origin                   │
│  0│/011413.sst│   483+│   0-│   17976│userid_password                 │
│  1│/011414.sst│ 30332+│   0-│  452843│tokenids                        │
│  5│/011421.sst│    32+│   0-│    3600│mediaid_file                    │
│  5│/011422.sst│    25+│   0-│    2932│mediaid_user                    │
│  0│/011423.sst│   828+│ 360-│   38009│servercurrentevent_data         │
│  0│/011426.sst│    10+│   0-│    2687│servername_destination          │
│  0│/011427.sst│    12+│   0-│    2761│servername_override             │
I am running a modified/tweaked version of this branch on a development account. I have joined Matrix HQ and many large or allegedly or reportedly "broken" rooms without ill-effect. I believe I have fixed some things by brute force that were previously assumed to be solely under the purview of transactions... (Although, it seems I have also introduced some more caching issues. But I would personally prefer to clear my cache and get into rooms than never get into them at all). Briefly, I had issues on this branch, which caused the accumulation of `eventid_outlierpdu` and possibly others? (See DB files output below log). ![Screenshot_20260227_085255-2](/attachments/12f804b2-d0ec-4322-905f-83ef69f98dda) Sample logs: ```log api::client::sync::v3::joined: fetch_shortstatehashes: room=!fo2YUTHHGEPw7SfF0w_FDVIUKk6sAPVhcLbS5XW8OlY last_count=Some(538690) current=476878 last_end=Some(476878) api::client::sync::v3::joined: fetch_shortstatehashes: room=!eBgZCVRnRRkKchiYzS:monero.social last_count=Some(538690) current=531463 last_end=Some(531463) api::client::sync::v3::joined: fetch_shortstatehashes: room=!da26JtAjE6APGLnX8ncWsvc-skF2KQZ9Nw_MbNpYD2k last_count=Some(538690) current=524692 last_end=Some(524692) service::rooms::timeline: next_shortstatehash: after=Normal(538690) next_count=Normal(538707) room=!xUW4PpAe1CmThA3r2wI8IrgwwsK006-zqWdJCljpd10 service::rooms::timeline: next_shortstatehash: shorteventid=538703 service::rooms::state: get_shortstatehash: shorteventid=538703 result=Ok(525087) service::rooms::timeline: next_shortstatehash: result=Ok(525087) api::client::sync::v3::joined: fetch_shortstatehashes: room=!xUW4PpAe1CmThA3r2wI8IrgwwsK006-zqWdJCljpd10 last_count=Some(538690) current=517877 last_end=Some(525087) api::client::sync::v3::joined: fetch_shortstatehashes: room=!sM2LwqNHGQOgLf35gqxPMy9D7oYde2q9ADg8HPBM3kE last_count=Some(538690) current=480334 last_end=Some(480334) api::client::sync::v3::joined: fetch_shortstatehashes: room=!nmYLVkF8x0OSAyicrN:luckyskies.pet last_count=Some(538690) current=523224 last_end=Some(523224) ``` DB files: ```shell uwu> debug database-files │lev│ sst │ keys │dels │ size │ column │ ├───┼───────────┼───────┼─────┼────────┼────────────────────────────────┤ │ 0│/000185.sst│ 209+│ 0-│ 32343│servername_destination │ │ 0│/000186.sst│ 336+│ 0-│ 43999│servername_override │ │ 1│/000198.sst│ 17+│ 0-│ 1362│roomsynctoken_shortstatehash │ │ 0│/000299.sst│ 631+│ 0-│ 95702│servername_destination │ │ 0│/000300.sst│ 897+│ 0-│ 115720│servername_override │ │ 0│/000416.sst│ 12+│ 0-│ 3157│servername_destination │ │ 0│/000417.sst│ 12+│ 0-│ 2760│servername_override │ │ 0│/000489.sst│ 852+│ 170-│ 108099│servername_destination │ │ 0│/000491.sst│ 1245+│ 233-│ 136658│servername_override │ │ 0│/000608.sst│ 9+│ 0-│ 2506│servername_destination │ │ 0│/000610.sst│ 14+│ 0-│ 2958│servername_override │ │ 0│/000674.sst│ 842+│ 835-│ 23952│servername_destination │ │ 0│/000675.sst│ 1222+│1215-│ 35933│servername_override │ │ 0│/000766.sst│ 464+│ 0-│ 71785│servername_destination │ │ 0│/000797.sst│ 685+│ 0-│ 88833│servername_override │ │ 0│/000940.sst│ 666+│ 0-│ 100935│servername_destination │ │ 0│/000942.sst│ 1023+│ 0-│ 131819│servername_override │ │ 0│/001076.sst│ 16+│ 0-│ 3671│servername_destination │ │ 0│/001078.sst│ 23+│ 0-│ 4185│servername_override │ │ 0│/001128.sst│ 7+│ 0-│ 2256│servername_destination │ │ 0│/001130.sst│ 8+│ 0-│ 2240│servername_override │ │ 0│/001257.sst│ 9+│ 0-│ 2529│servername_destination │ │ 0│/001261.sst│ 13+│ 0-│ 2816│servername_override │ │ 0│/001398.sst│ 7+│ 0-│ 2320│servername_destination │ │ 0│/001399.sst│ 12+│ 0-│ 2719│servername_override │ │ 0│/001496.sst│ 4+│ 0-│ 1842│servername_destination │ │ 0│/001497.sst│ 5+│ 0-│ 1855│servername_override │ │ 0│/001526.sst│ 1+│ 0-│ 1354│servername_destination │ │ 0│/001528.sst│ 2+│ 0-│ 1451│servername_override │ │ 0│/001687.sst│ 4+│ 0-│ 1776│servername_destination │ │ 0│/001689.sst│ 8+│ 0-│ 2179│servername_override │ │ 0│/001774.sst│ 8+│ 0-│ 2360│servername_destination │ │ 0│/001777.sst│ 7+│ 0-│ 2111│servername_override │ │ 0│/001869.sst│ 11+│ 0-│ 2756│servername_destination │ │ 0│/001870.sst│ 14+│ 0-│ 2939│servername_override │ │ 0│/002018.sst│ 7+│ 0-│ 2230│servername_destination │ │ 0│/002020.sst│ 10+│ 0-│ 2418│servername_override │ │ 0│/002160.sst│ 292+│ 0-│ 44471│servername_destination │ │ 0│/002164.sst│ 284+│ 0-│ 37262│servername_override │ │ 0│/002492.sst│ 666+│ 0-│ 100164│servername_destination │ │ 0│/002493.sst│ 733+│ 0-│ 93835│servername_override │ │ 0│/002672.sst│ 2183+│1489-│ 144622│servername_destination │ │ 0│/002673.sst│ 2857+│1816-│ 184376│servername_override │ │ 1│/002758.sst│ 32257+│ 0-│ 244860│roomsynctoken_shortstatehash │ │ 0│/002812.sst│ 427+│ 0-│ 64484│servername_destination │ │ 0│/002815.sst│ 506+│ 0-│ 65058│servername_override │ │ 0│/002946.sst│ 5174+│ 0-│ 192217│roomsynctoken_shortstatehash │ │ 0│/002956.sst│ 7+│ 0-│ 2294│servername_destination │ │ 0│/002958.sst│ 32+│ 0-│ 5226│servername_override │ │ 0│/003144.sst│ 12+│ 0-│ 3021│servername_destination │ │ 0│/003147.sst│ 12+│ 0-│ 2701│servername_override │ │ 0│/003237.sst│ 31+│ 0-│ 5835│servername_destination │ │ 0│/003240.sst│ 48+│ 0-│ 7310│servername_override │ │ 0│/003353.sst│ 220+│ 0-│ 34005│servername_destination │ │ 0│/003356.sst│ 227+│ 0-│ 30165│servername_override │ │ 0│/003549.sst│ 12+│ 0-│ 2964│servername_destination │ │ 0│/003550.sst│ 18+│ 0-│ 3442│servername_override │ │ 0│/003629.sst│ 29+│ 0-│ 5477│servername_destination │ │ 0│/003631.sst│ 32+│ 0-│ 5284│servername_override │ │ 0│/003748.sst│ 100+│ 0-│ 16511│servername_destination │ │ 0│/003750.sst│ 159+│ 0-│ 21664│servername_override │ │ 0│/003885.sst│ 61+│ 0-│ 10414│servername_destination │ │ 0│/003890.sst│ 81+│ 0-│ 11478│servername_override │ │ 0│/004009.sst│ 6+│ 0-│ 2088│servername_destination │ │ 0│/004010.sst│ 8+│ 0-│ 2177│servername_override │ │ 0│/004162.sst│ 11+│ 0-│ 2892│servername_destination │ │ 0│/004164.sst│ 16+│ 0-│ 3332│servername_override │ │ 0│/004253.sst│ 1612+│1595-│ 45356│servername_destination │ │ 0│/004255.sst│ 2185+│2165-│ 63975│servername_override │ │ 0│/004388.sst│ 1205+│ 0-│ 181050│servername_destination │ │ 0│/004401.sst│ 1548+│ 0-│ 198666│servername_override │ │ 0│/004532.sst│ 1228+│ 256-│ 153079│servername_destination │ │ 0│/004539.sst│ 1577+│ 283-│ 173719│servername_override │ │ 0│/004575.sst│ 1+│ 0-│ 1353│servername_destination │ │ 0│/004636.sst│ 3+│ 0-│ 1599│servername_destination │ │ 0│/004637.sst│ 2+│ 0-│ 1423│servername_override │ │ 0│/004770.sst│ 213+│ 0-│ 33086│servername_destination │ │ 0│/004774.sst│ 334+│ 0-│ 43463│servername_override │ │ 0│/005021.sst│ 5+│ 0-│ 1853│servername_override │ │ 0│/005033.sst│ 5+│ 0-│ 1986│servername_destination │ │ 0│/005120.sst│ 3+│ 0-│ 1645│servername_destination │ │ 0│/005146.sst│ 5+│ 0-│ 1853│servername_override │ │ 0│/005453.sst│ 1+│ 0-│ 1430│servername_destination │ │ 0│/005454.sst│ 2+│ 0-│ 1517│servername_override │ │ 0│/005615.sst│ 2+│ 0-│ 1511│servername_destination │ │ 0│/005644.sst│ 2+│ 0-│ 1430│servername_override │ │ 0│/005803.sst│ 1+│ 0-│ 1446│servername_destination │ │ 0│/005804.sst│ 1+│ 0-│ 1387│servername_override │ │ 0│/005962.sst│ 40+│ 0-│ 7114│servername_destination │ │ 0│/005985.sst│ 59+│ 0-│ 8687│servername_override │ │ 0│/006097.sst│ 595+│ 0-│ 93020│servername_destination │ │ 0│/006172.sst│ 746+│ 0-│ 98055│servername_override │ │ 0│/006239.sst│ 1+│ 0-│ 1377│servername_destination │ │ 0│/006456.sst│ 338+│ 0-│ 44659│servername_override │ │ 0│/006464.sst│ 222+│ 0-│ 35460│servername_destination │ │ 0│/006548.sst│ 2879+│ 0-│ 371036│servername_override │ │ 0│/006550.sst│ 2626+│ 0-│ 400869│servername_destination │ │ 0│/007083.sst│ 271+│ 0-│ 43005│servername_destination │ │ 0│/007085.sst│ 399+│ 0-│ 52162│servername_override │ │ 0│/007365.sst│ 1084+│ 0-│ 163664│servername_destination │ │ 0│/007366.sst│ 1029+│ 0-│ 131814│servername_override │ │ 0│/007566.sst│ 6040+│6040-│ 166176│servername_destination │ │ 0│/007568.sst│ 7095+│7095-│ 202173│servername_override │ │ 0│/007680.sst│ 433+│ 0-│ 66044│servername_destination │ │ 0│/007682.sst│ 394+│ 0-│ 51449│servername_override │ │ 0│/007881.sst│ 8+│ 0-│ 2469│servername_destination │ │ 0│/007883.sst│ 9+│ 0-│ 2395│servername_override │ │ 5│/008110.sst│ 1+│ 0-│ 2087│eventid_outlierpdu │ │ 0│/008166.sst│ 651+│ 0-│ 98675│servername_destination │ │ 0│/008167.sst│ 1018+│ 0-│ 131205│servername_override │ │ 0│/008374.sst│ 7+│ 0-│ 2227│servername_destination │ │ 0│/008375.sst│ 8+│ 0-│ 2208│servername_override │ │ 0│/008450.sst│ 312+│ 0-│ 48966│servername_destination │ │ 0│/008452.sst│ 493+│ 0-│ 64483│servername_override │ │ 1│/008518.sst│ 1+│ 0-│ 1228│alias_roomid │ │ 1│/008519.sst│ 1+│ 0-│ 1217│alias_userid │ │ 1│/008520.sst│ 1+│ 0-│ 1327│aliasid_alias │ │ 3│/008575.sst│ 42201+│ 0-│ 2163609│eventid_shorteventid │ │ 1│/008588.sst│ 28+│ 0-│ 10998│keyid_key │ │ 1│/008599.sst│ 50+│ 0-│ 12055│onetimekeyid_onetimekeys │ │ 1│/008604.sst│ 18+│ 0-│ 9366│pduid_pdu │ │ 1│/008626.sst│ 7141+│ 0-│ 201101│roomserverids │ │ 1│/008637.sst│ 179+│ 0-│ 10063│roomuserid_lastprivatereadupdate│ │ 1│/008641.sst│ 179+│ 0-│ 10053│roomuserid_privateread │ │ 1│/008648.sst│ 589+│ 0-│ 55705│servercurrentevent_data │ │ 1│/008653.sst│ 7141+│ 0-│ 318073│serverroomids │ │ 5│/008661.sst│196177+│ 0-│12580453│shorteventid_eventid │ │ 1│/008664.sst│ 15+│ 0-│ 1319│shorteventid_shortstatehash │ │ 1│/008665.sst│ 1601+│ 0-│ 12978│shorteventid_shortstatehash │ │ 1│/008669.sst│ 285+│ 0-│ 931407│shortstatehash_statediff │ │ 5│/008672.sst│ 70887+│ 0-│ 1941917│shortstatekey_statekey │ │ 1│/008680.sst│ 602+│ 0-│ 6978│tofrom_relation │ │ 1│/008681.sst│ 1+│ 0-│ 1312│token_userdeviceid │ │ 1│/008684.sst│ 183+│ 0-│ 4358│tokenids │ │ 1│/008686.sst│ 1+│ 0-│ 1336│url_previews │ │ 1│/008690.sst│ 1+│ 0-│ 1310│userdeviceid_token │ │ 1│/008691.sst│ 4+│ 0-│ 1739│userdevicesessionid_uiaainfo │ │ 1│/008692.sst│ 20+│ 0-│ 2742│userdevicetxnid_response │ │ 1│/008693.sst│ 1+│ 0-│ 1358│userfilterid_filter │ │ 1│/008694.sst│ 1+│ 0-│ 1295│userid_avatarurl │ │ 1│/008695.sst│ 1+│ 0-│ 1257│userid_devicelistversion │ │ 1│/008696.sst│ 1+│ 0-│ 1258│userid_displayname │ │ 1│/008697.sst│ 1+│ 0-│ 1260│userid_lastonetimekeyupdate │ │ 1│/008699.sst│ 16+│ 0-│ 2491│userid_masterkeyid │ │ 1│/008702.sst│ 1+│ 0-│ 1258│userid_origin │ │ 1│/008707.sst│ 2299+│ 0-│ 68483│userid_presenceid │ │ 1│/008710.sst│ 7+│ 0-│ 1796│userid_selfsigningkeyid │ │ 4│/008729.sst│ 14576+│ 0-│ 5867060│userroomid_leftstate │ │ 4│/008731.sst│ 17625+│ 0-│ 7160740│userroomid_leftstate │ │ 4│/008732.sst│ 1722+│ 0-│ 693382│userroomid_leftstate │ │ 0│/008746.sst│ 1494+│1261-│ 69450│servername_destination │ │ 0│/008748.sst│ 2059+│1659-│ 98316│servername_override │ │ 0│/008947.sst│ 1041+│ 0-│ 157166│servername_destination │ │ 0│/008950.sst│ 1042+│ 0-│ 134139│servername_override │ │ 0│/008965.sst│ 2+│ 0-│ 1434│userid_selfsigningkeyid │ │ 0│/009084.sst│ 1+│ 0-│ 1374│servername_destination │ │ 1│/009129.sst│ 10+│ 0-│ 1278│shorteventid_shortstatehash │ │ 2│/009170.sst│ 32457+│ 0-│ 2164005│eventid_shorteventid │ │ 2│/009172.sst│ 32457+│ 0-│ 2164125│eventid_shorteventid │ │ 0│/009266.sst│ 106+│ 0-│ 17213│servername_destination │ │ 0│/009281.sst│ 135+│ 0-│ 18258│servername_override │ │ 1│/009295.sst│ 3+│ 0-│ 1243│shorteventid_shortstatehash │ │ 6│/009308.sst│ 26+│ 0-│ 2630│roomid_shortroomid │ │ 0│/009433.sst│ 1+│ 0-│ 1349│servername_destination │ │ 0│/009434.sst│ 1+│ 0-│ 1327│servername_override │ │ 5│/009483.sst│ 28350+│ 0-│17024975│eventid_outlierpdu │ │ 5│/009518.sst│ 25231+│ 0-│15236342│eventid_outlierpdu │ │ 6│/009522.sst│ 28599+│ 0-│17026729│eventid_outlierpdu │ │ 6│/009523.sst│ 2755+│ 0-│ 1638772│eventid_outlierpdu │ │ 0│/009643.sst│ 135+│ 0-│ 18311│servername_override │ │ 0│/009644.sst│ 87+│ 0-│ 14340│servername_destination │ │ 0│/009737.sst│ 2492+│2424-│ 77630│servername_override │ │ 0│/009774.sst│ 1967+│1930-│ 58002│servername_destination │ │ 0│/009812.sst│ 42+│ 0-│ 6531│servername_override │ │ 0│/009828.sst│ 18+│ 0-│ 3928│servername_destination │ │ 0│/009906.sst│ 1541+│ 888-│ 108704│servername_override │ │ 1│/009971.sst│ 6+│ 0-│ 1265│shorteventid_shortstatehash │ │ 2│/010008.sst│ 3564+│1353-│ 2111703│userroomid_leftstate │ │ 2│/010011.sst│ 3577+│1368-│ 2109052│userroomid_leftstate │ │ 1│/010014.sst│ 9159+│ 0-│ 147061│servernameevent_data │ │ 1│/010022.sst│ 12+│ 0-│ 1289│shorteventid_shortstatehash │ │ 1│/010029.sst│ 6+│ 0-│ 1246│shorteventid_shortstatehash │ │ 4│/010033.sst│ 891+│ 1-│ 831776│eventid_outlierpdu │ │ 4│/010060.sst│ 868+│ 1-│ 821683│eventid_outlierpdu │ │ 4│/010071.sst│ 1397+│ 1-│ 1316636│eventid_outlierpdu │ │ 5│/010078.sst│ 27973+│ 0-│17024171│eventid_outlierpdu │ │ 5│/010079.sst│ 9976+│ 0-│ 6082131│eventid_outlierpdu │ │ 4│/010081.sst│ 455+│ 0-│ 453585│eventid_outlierpdu │ │ 4│/010084.sst│ 3914+│ 12-│ 3763862│eventid_outlierpdu │ │ 5│/010086.sst│ 27978+│ 0-│17024059│eventid_outlierpdu │ │ 5│/010087.sst│ 16435+│ 0-│ 9833823│eventid_outlierpdu │ │ 5│/010089.sst│ 27569+│ 0-│16865186│eventid_outlierpdu │ │ 4│/010091.sst│ 1949+│ 4-│ 1932572│eventid_outlierpdu │ │ 4│/010092.sst│ 1328+│ 4-│ 1267453│eventid_outlierpdu │ │ 5│/010093.sst│ 27917+│ 0-│17025325│eventid_outlierpdu │ │ 5│/010094.sst│ 8239+│ 0-│ 5008337│eventid_outlierpdu │ │ 3│/010097.sst│ 1304+│ 3-│ 1271135│eventid_outlierpdu │ │ 4│/010098.sst│ 1021+│ 3-│ 950510│eventid_outlierpdu │ │ 4│/010099.sst│ 442+│ 1-│ 398116│eventid_outlierpdu │ │ 5│/010100.sst│ 27971+│ 0-│17024784│eventid_outlierpdu │ │ 5│/010101.sst│ 6695+│ 0-│ 4037267│eventid_outlierpdu │ │ 3│/010102.sst│ 1423+│ 2-│ 1328832│eventid_outlierpdu │ │ 0│/010111.sst│ 1393+│ 662-│ 128607│servername_destination │ │ 1│/010117.sst│ 2+│ 0-│ 1234│shorteventid_shortstatehash │ │ 0│/010178.sst│ 668+│ 0-│ 85953│servername_override │ │ 0│/010199.sst│ 202+│ 0-│ 31688│servername_destination │ │ 0│/010252.sst│ 18+│ 0-│ 4041│servername_destination │ │ 0│/010260.sst│ 1+│ 0-│ 1370│servername_override │ │ 6│/010299.sst│ 27+│ 0-│ 2635│roomid_shortstatehash │ │ 0│/010351.sst│ 13+│ 0-│ 3195│servername_destination │ │ 0│/010357.sst│ 8+│ 0-│ 2233│servername_override │ │ 2│/010384.sst│ 1760+│ 59-│ 2117275│eventid_outlierpdu │ │ 0│/010447.sst│ 3+│ 0-│ 1652│servername_destination │ │ 0│/010452.sst│ 4+│ 0-│ 1684│servername_override │ │ 2│/010470.sst│ 1430+│ 22-│ 2117096│eventid_outlierpdu │ │ 1│/010479.sst│ 52146+│ 0-│ 803634│statekey_shortstatekey │ │ 1│/010480.sst│ 33022+│ 0-│ 525241│statekey_shortstatekey │ │ 1│/010481.sst│ 487+│ 0-│ 10889│roomuserid_leftcount │ │ 1│/010488.sst│ 7816+│ 0-│ 671722│server_signingkeys │ │ 1│/010491.sst│ 14164+│ 0-│ 170312│userid_origin │ │ 1│/010492.sst│ 70658+│ 0-│ 858855│userid_origin │ │ 1│/010497.sst│ 34+│ 0-│ 1425│shorteventid_shortstatehash │ │ 1│/010503.sst│ 46448+│ 0-│ 961883│roomuseroncejoinedids │ │ 1│/010504.sst│ 16868+│ 0-│ 352228│roomuseroncejoinedids │ │ 2│/010511.sst│ 2368+│1055-│ 1272248│userroomid_leftstate │ │ 1│/010512.sst│ 84823+│ 0-│ 990252│userid_password │ │ 1│/010527.sst│ 3+│ 0-│ 1241│shorteventid_shortstatehash │ │ 6│/010528.sst│ 62963+│ 0-│ 1767868│roomuserid_joined │ │ 3│/010532.sst│ 1370+│ 0-│ 1310134│eventid_outlierpdu │ │ 4│/010533.sst│ 1659+│ 4-│ 1588905│eventid_outlierpdu │ │ 4│/010534.sst│ 983+│ 2-│ 908838│eventid_outlierpdu │ │ 3│/010535.sst│ 349+│ 0-│ 354884│eventid_outlierpdu │ │ 5│/010536.sst│ 22150+│ 0-│17022442│eventid_outlierpdu │ │ 5│/010537.sst│ 20122+│ 0-│15439820│eventid_outlierpdu │ │ 3│/010538.sst│ 1371+│ 1-│ 1295498│eventid_outlierpdu │ │ 4│/010539.sst│ 2048+│ 3-│ 1954712│eventid_outlierpdu │ │ 0│/010581.sst│ 403+│ 0-│ 61302│servername_destination │ │ 0│/010591.sst│ 394+│ 0-│ 51376│servername_override │ │ 1│/010656.sst│ 2+│ 0-│ 1233│shorteventid_shortstatehash │ │ 2│/010658.sst│ 1618+│ 64-│ 1692615│eventid_outlierpdu │ │ 3│/010660.sst│ 1953+│ 34-│ 1678698│eventid_outlierpdu │ │ 4│/010661.sst│ 5791+│ 17-│ 5536446│eventid_outlierpdu │ │ 4│/010662.sst│ 1287+│ 1-│ 1203633│eventid_outlierpdu │ │ 1│/010711.sst│ 48684+│ 0-│ 1014448│userroomid_joined │ │ 1│/010712.sst│ 14902+│ 0-│ 313635│userroomid_joined │ │ 2│/010719.sst│ 3217+│1492-│ 1666213│userroomid_leftstate │ │ 0│/010791.sst│ 1391+│1369-│ 40688│servername_destination │ │ 0│/010796.sst│ 1748+│1722-│ 52908│servername_override │ │ 1│/010812.sst│ 8+│ 0-│ 1266│shorteventid_shortstatehash │ │ 0│/010858.sst│ 1+│ 0-│ 1379│servername_destination │ │ 0│/010860.sst│ 2+│ 0-│ 1444│servername_override │ │ 5│/010894.sst│ 7+│ 0-│ 1688│roomid_shortroomid │ │ 1│/010906.sst│ 17+│ 0-│ 1299│shorteventid_shortstatehash │ │ 6│/010923.sst│ 1209+│ 0-│ 70041│mediaid_file │ │ 6│/010926.sst│ 1008+│ 0-│ 53896│mediaid_user │ │ 6│/010936.sst│ 5+│ 0-│ 1456│roomusertype_roomuserdataid │ │ 0│/010989.sst│ 1770+│ 0-│ 265975│servername_destination │ │ 0│/010991.sst│ 2072+│ 0-│ 265734│servername_override │ │ 1│/011022.sst│ 1+│ 0-│ 1223│shorteventid_shortstatehash │ │ 1│/011043.sst│ 1786+│ 226-│ 1469042│userroomid_leftstate │ │ 1│/011044.sst│ 3684+│1439-│ 2111709│userroomid_leftstate │ │ 1│/011045.sst│ 1980+│1187-│ 769800│userroomid_leftstate │ │ 1│/011046.sst│ 993+│ 67-│ 880739│userroomid_leftstate │ │ 1│/011047.sst│ 1929+│1267-│ 665442│userroomid_leftstate │ │ 1│/011048.sst│ 204+│ 128-│ 75068│userroomid_leftstate │ │ 1│/011072.sst│ 455+│ 0-│ 6879│keychangeid_userid │ │ 0│/011077.sst│ 6+│ 0-│ 4400│keyid_key │ │ 0│/011078.sst│ 91+│ 0-│ 21983│server_signingkeys │ │ 0│/011082.sst│ 4+│ 0-│ 1599│userid_masterkeyid │ │ 1│/011090.sst│ 2110+│ 0-│ 2109638│pduid_pdu │ │ 1│/011091.sst│ 2708+│ 0-│ 1253586│pduid_pdu │ │ 0│/011149.sst│ 1271+│ 9-│ 87503│serverroomids │ │ 0│/011154.sst│ 13+│ 0-│ 3074│servername_destination │ │ 0│/011157.sst│ 27+│ 0-│ 4637│servername_override │ │ 1│/011172.sst│ 45+│ 0-│ 1546│shorteventid_shortstatehash │ │ 1│/011174.sst│ 418+│ 0-│ 12196│userroomid_highlightcount │ │ 1│/011182.sst│ 111+│ 0-│ 15725│url_previews │ │ 1│/011183.sst│ 209+│ 0-│ 6818│userroomid_notificationcount │ │ 6│/011192.sst│ 12+│ 0-│ 1667│global │ │ 1│/011228.sst│ 1961+│ 0-│ 78904│referencedevents │ │ 1│/011239.sst│ 46972+│ 0-│ 821278│roomuserid_leftcount │ │ 6│/011251.sst│ 2927+│ 0-│ 64988│servername_educount │ │ 0│/011269.sst│ 1271+│ 9-│ 94481│roomserverids │ │ 0│/011277.sst│ 203+│ 0-│ 31585│servername_destination │ │ 0│/011279.sst│ 287+│ 0-│ 37591│servername_override │ │ 4│/011282.sst│ 33949+│ 0-│ 2223697│shorteventid_eventid │ │ 0│/011284.sst│ 74+│ 0-│ 3356│shorteventid_shortstatehash │ │ 1│/011287.sst│ 21+│ 0-│ 1391│shorteventid_shortstatehash │ │ 0│/011288.sst│ 976+│ 0-│ 43155│userid_presenceid │ │ 0│/011290.sst│ 54+│ 0-│ 6005│userroomid_highlightcount │ │ 0│/011294.sst│ 6+│ 0-│ 1751│keychangeid_userid │ │ 0│/011316.sst│ 30+│ 0-│ 3918│userroomid_notificationcount │ │ 0│/011320.sst│ 1+│ 0-│ 1198│global │ │ 0│/011324.sst│ 90+│ 0-│ 10630│referencedevents │ │ 0│/011328.sst│ 1654+│ 0-│ 58343│servername_educount │ │ 0│/011335.sst│ 3+│ 3-│ 1406│roomid_inviteviaservers │ │ 0│/011339.sst│ 76+│ 0-│ 3410│tofrom_relation │ │ 0│/011340.sst│ 61+│ 0-│ 613808│shortstatehash_statediff │ │ 1│/011341.sst│ 293+│ 0-│ 12897│statehash_shortstatehash │ │ 1│/011342.sst│ 13808+│ 0-│ 920609│eventid_shorteventid │ │ 1│/011343.sst│ 32457+│ 0-│ 2164401│eventid_shorteventid │ │ 1│/011344.sst│ 32457+│ 0-│ 2164365│eventid_shorteventid │ │ 1│/011345.sst│ 27452+│ 0-│ 1830678│eventid_shorteventid │ │ 1│/011346.sst│ 14032+│ 0-│ 936363│eventid_shorteventid │ │ 0│/011347.sst│ 182+│ 0-│ 163416│pduid_pdu │ │ 0│/011349.sst│ 193+│ 127-│ 17385│roomuserid_leftcount │ │ 1│/011350.sst│ 24783+│ 0-│ 1879494│shorteventid_authchain │ │ 1│/011351.sst│ 24044+│ 0-│ 2116359│shorteventid_authchain │ │ 1│/011352.sst│ 926+│ 0-│ 308498│shorteventid_authchain │ │ 6│/011353.sst│ 1+│ 0-│ 1399│userdeviceid_metadata │ │ 6│/011354.sst│ 34+│ 0-│ 4845│roomid_pduleaves │ │ 0│/011355.sst│ 63+│ 0-│ 7086│roomuserid_lastprivatereadupdate│ │ 0│/011356.sst│ 63+│ 0-│ 7076│roomuserid_privateread │ │ 1│/011357.sst│ 1518+│ 214-│ 1253655│eventid_outlierpdu │ │ 1│/011358.sst│ 2650+│ 250-│ 2121460│eventid_outlierpdu │ │ 1│/011359.sst│ 2656+│ 253-│ 2120969│eventid_outlierpdu │ │ 1│/011360.sst│ 2345+│ 212-│ 1862972│eventid_outlierpdu │ │ 1│/011361.sst│ 845+│ 79-│ 678525│eventid_outlierpdu │ │ 1│/011362.sst│ 5018+│ 0-│ 307784│eventid_pduid │ │ 4│/011363.sst│ 14685+│ 0-│ 879213│shortstatekey_statekey │ │ 0│/011364.sst│ 404+│ 0-│ 24373│statekey_shortstatekey │ │ 6│/011365.sst│ 2497+│ 0-│ 185568│presenceid_presence │ │ 1│/011366.sst│ 1077+│ 0-│ 88958│readreceiptid_readreceipt │ │ 6│/011367.sst│ 32+│ 0-│ 2766│roomuserid_invitecount │ │ 5│/011368.sst│ 1996+│ 880-│ 90398│roomuserid_joined │ │ 6│/011371.sst│ 32+│ 0-│ 2764│roomuserid_knockedcount │ │ 6│/011374.sst│ 32+│ 0-│ 7833│userroomid_invitestate │ │ 0│/011377.sst│ 655+│ 161-│ 51415│userroomid_joined │ │ 0│/011380.sst│ 281+│ 209-│ 89434│userroomid_leftstate │ │ 6│/011389.sst│ 32+│ 0-│ 3389│userroomid_invitesender │ │ 6│/011390.sst│ 32+│ 0-│ 2772│roomid_invitedcount │ │ 6│/011391.sst│ 32+│ 0-│ 2848│roomid_joinedcount │ │ 5│/011396.sst│ 12+│ 0-│ 2007│roomid_shortstatehash │ │ 6│/011397.sst│ 294+│ 0-│ 19462│lazyloadedids │ │ 6│/011400.sst│ 5+│ 0-│ 2925│roomuserdataid_accountdata │ │ 0│/011409.sst│ 1+│ 0-│ 1355│roomusertype_roomuserdataid │ │ 0│/011411.sst│ 774+│ 0-│ 55848│roomuseroncejoinedids │ │ 0│/011412.sst│ 482+│ 0-│ 21823│userid_origin │ │ 0│/011413.sst│ 483+│ 0-│ 17976│userid_password │ │ 1│/011414.sst│ 30332+│ 0-│ 452843│tokenids │ │ 5│/011421.sst│ 32+│ 0-│ 3600│mediaid_file │ │ 5│/011422.sst│ 25+│ 0-│ 2932│mediaid_user │ │ 0│/011423.sst│ 828+│ 360-│ 38009│servercurrentevent_data │ │ 0│/011426.sst│ 10+│ 0-│ 2687│servername_destination │ │ 0│/011427.sst│ 12+│ 0-│ 2761│servername_override │ ```
Author
Contributor

Matrix Complement Test Suite results /csapi

2026-02-27T14:15:51.0050286Z DONE 739 tests, 8 skipped, 244 failures in 672.761s

https://github.com/gamesguru/continuwuity/actions/runs/22488841324/job/65145319770

Matrix Complement Test Suite results `/csapi` `2026-02-27T14:15:51.0050286Z DONE 739 tests, 8 skipped, 244 failures in 672.761s` https://github.com/gamesguru/continuwuity/actions/runs/22488841324/job/65145319770
Author
Contributor

I merged in the transaction branch (at least on my GitHub remote).

Some initial findings:

  • Disk I/O (database reads) rocketed up from its baseline on main (anytime any users are online or sending sync requests)
  • Initial sync is painfully slow (completely inadequate imo, and requires some attention)
  • Startup times seem better (perhaps due to less RocksDB bootup overhead?)
  • Populating chats and anything that involves switching screens/spaces/rooms can be sluggish
I merged in the transaction branch (at least on my GitHub remote). Some initial findings: - Disk I/O (database reads) rocketed up from its baseline on main (anytime any users are online or sending sync requests) - Initial sync is painfully slow (completely inadequate imo, and requires some attention) - Startup times seem better (perhaps due to less RocksDB bootup overhead?) - Populating chats and anything that involves switching screens/spaces/rooms can be sluggish
make .envrc work for me
tidy/remove bloat, consolidate
tidy up, fix build error
"Your browser is deprecated. Please upgrade."
feat: implement transactional wrappers around room joins and other key code blocks writing to the database
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 15m40s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 24m23s
7b846ccffe
edits in join.rs to support better transactions

lint fixes

add a test to ensure the database nested transaction panic works as expected

add news fragment
During first-run mode, registration requires m.login.registration_token
which Complement cannot supply. The entrypoint now starts conduwuit,
parses the auto-generated token from the welcome banner, registers a
first admin user to exit first-run mode, then lets Complement tests
proceed using m.login.dummy auth.
Two fixes:

1. Error::Uiaa now maps to StatusCode::UNAUTHORIZED (401) in
   status_code() instead of falling through to the wildcard
   INTERNAL_SERVER_ERROR (500). Fixes issue #1409.

2. When yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse
   is set, first-run mode no longer forces m.login.registration_token.
   Admins that explicitly opted into open registration should get
   m.login.dummy on first-run just like subsequent registrations.
   Fixes Complement TestRegistration failures.

Also adds docker/complement Makefile target for local Complement testing.
The Dockerfile copies target/debug/conduwuit, but the Makefile was
building with the default dev-quick profile into target/dev-quick/.
Docker then silently reused the cached old binary.

Use PROFILE=dev to match CI and ensure the binary goes to target/debug/,
and add --no-cache to docker build to force a fresh image.
The Dockerfile was hardcoded to target/debug/conduwuit but the Makefile
builds to target/dev-quick/ by default, causing Docker to silently
reuse the old cached binary.

target/latest is a symlink that always points to the last-built profile
directory. Using it means the Dockerfile works correctly regardless of
whether the user built with dev, dev-quick, or release.
Docker COPY doesn't follow host symlinks, so target/latest/conduwuit
failed. The Makefile now copies the resolved binary to
target/conduwuit-complement before docker build, and the Dockerfile
copies from that stable non-symlinked path.
Use PROFILE=dev (matching CI) to ensure binary is in target/debug/
where the Dockerfile expects it. The dev-quick profile doesn't produce
a conduwuit binary in its output directory.
Shell env vars don't override .env file values in sub-make calls.
Make command-line arguments have the highest precedence and correctly
override whatever PROFILE is set in .env.
CARGO_FLAGS default includes --profile, so overriding it requires
including --profile explicitly. Revert Dockerfile to target/debug/
since both dev and dev-quick produce the binary there.
Docker COPY cannot follow directory symlinks in the build context.
Resolve target/latest to the actual profile dir using readlink,
cp the binary to target/conduwuit-complement (a plain file),
and COPY from that in the Dockerfile.
iterate_tokens() always returns the first-run token during first-run
mode, so the previous fix still caused the RegistrationToken flow to
be offered. Now the iterate_tokens() check is also skipped when
open_registration is explicitly enabled, allowing the code to fall
through to the m.login.dummy flow path.
- .dockerignore: whitelist target/dev-quick/conduwuit and target/latest/conduwuit
- Dockerfile: copy from target/dev-quick/conduwuit (concrete path, no symlink)
- Makefile: pass through PROFILE and include --profile in CARGO_FLAGS override
This error occurred fairly early in the Complement logs:

```log
=== NAME  TestDeviceManagement/DELETE_/device/{deviceId}
    apidoc_device_management_test.go:134: MatchResponse got status 400 want 401 - http://127.0.0.1:32820/_matrix/client/v3/devices/7hTYOfr7hy => {"errcode":"M_NOT_JSON","error":"M_NOT_JSON: Not json."}
=== RUN   TestDeviceManagement/DELETE_/device/{deviceId}_requires_UI_auth_user_to_match_device_owner
```
fix: missing m.room.create outliers causing a sea of Empty rooms and Version 1 errors
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 23s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m44s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 37m37s
45c34d2cc5
gamesguru changed title from WIP: feat: stateless sync and orphan all sync tokens to feat: stateless sync and orphan all sync tokens 2026-03-01 13:23:38 +00:00
Author
Contributor

It's working a lot better now.

It's working a lot better now. <video src="https://i.imgur.com/1Dfs4jK.mp4" controls width="100%"></video>
perf: use wide_ methods to parallelize server discovery and remote PDU fetching
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 49s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m0s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 20m45s
cc21434412
fix: include outlier PDUs in state resolution to fix partially-loaded member lists
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 22s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m23s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 20m6s
d68d2dca9f
Author
Contributor

The PR is in a good state after the preceding commit (which fixes the loading symbol seen in the video aboe with large rooms), but i've added even more improvements that i'll soon push.

Currently trying to squash a bug i've identified where joining, leaving, and re-joining prevents you from leaving a 2nd time (keeping you locked in) with a 403 error, "M_FORBIDDEN: Event is not authorized."

But overall the branch is stable and very quick at handling large rooms. If you don't mind a few state bugs that we solve together, I encourage you to install it and beta test v19 of the schema.

Going to push up the remaining commits, and then hopefully squash the aforementioned 403 degenerate state bug, before finally pulling a few more features off onto separate PRs.

The PR is in a good state after the preceding commit (which fixes the loading symbol seen in the video aboe with large rooms), but i've added even more improvements that i'll soon push. Currently trying to squash a bug i've identified where joining, leaving, and re-joining prevents you from leaving a 2nd time (keeping you locked in) with a 403 error, "M_FORBIDDEN: Event is not authorized." But overall the branch is stable and very quick at handling large rooms. If you don't mind a few state bugs that we solve together, I encourage you to install it and beta test v19 of the schema. Going to push up the remaining commits, and then hopefully squash the aforementioned 403 degenerate state bug, before finally pulling a few more features off onto separate PRs.
update config key descriptions in config/mod.rs

add speculative fixes for the following 404 ORB errors in SchildiChat web:

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from matrix.sp-codes.de: [404 / M_UNRECOGNIZED] Unrecognized request mxc=mxc://matrix.sp-codes.de/SpHUPhCGRnsYTFlyRYCDZhDD authenticated=true"}

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from hampai.ch: [401 / M_UNAUTHORIZED] no auth provided (required) mxc=mxc://hampai.ch/b291e6908914b64277b7ed0e1de87df5d52cac241958243044855644160 authenticated=true"}

enforce freeze_legacy_media on all legacy remote fetch paths

fix: fallback to unauthenticated media on more errors and safely return NotFound for empty media
fix: lint warning on main to appease clippy
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m39s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 25m32s
e4a7f1bbd5
```log
2026-03-03T02:36:25.790498Z  INFO conduwuit_api::client::sync::v3::joined: user joined since last sync: last_sync_end_shortstatehash=Some(3316807), membership=Some(RoomMemberEventContent { avatar_url: Some("mxc://mdev.nutra.tk/Pb87ocP5NsGs7xvS9ZbIDhI30aU7EZLO"), displayname: Some("ggdev 🏴🚩"), is_direct: None, membership: "leave", third_party_invite: None, blurhash: None, reason: None, join_authorized_via_users_server: None, redact_events: None })
```
fix: restrict startup presence reset to local users
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 21s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m54s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 22m58s
5e5fdf5b52
Jade changed title from feat: stateless sync and orphan all sync tokens to WIP: feat: stateless sync and orphan all sync tokens 2026-03-03 18:32:29 +00:00
nex requested changes 2026-03-03 19:25:42 +00:00
nex left a comment
Owner

I've gotten through 61% of this PR and I'm just not going to continue further. This diff is impossible to review and there are way too many commits. Please squash some commits down (150 commits with 97 changed files is an infeasible number to review, forgejo even struggles to render this) and remove anything that isn't actually related to this PR's scope.

I've gotten through 61% of this PR and I'm just not going to continue further. This diff is impossible to review and there are way too many commits. Please squash some commits down (150 commits with 97 changed files is an infeasible number to review, forgejo even struggles to render this) and remove anything that isn't actually related to this PR's scope.
@ -31,2 +31,4 @@
indent_size = 4
indent_style = space
[Makefile]
Owner

This seems unnecessary, we don't use makefiles

This seems unnecessary, we don't use makefiles
@ -1,6 +1,9 @@
#!/usr/bin/env bash
dotenv_if_exists
watch_file .env
Owner

What is watch_file? Should be in its own PR anyway

What is `watch_file`? Should be in its own PR anyway
Author
Contributor

part of direnv's spec for .envrc files, see attached:

Document need to use watch_file · Issue #293 · direnv/direnv
https://github.com/direnv/direnv/issues/293

part of `direnv`'s spec for `.envrc` files, see attached: _Document need to use watch_file · Issue #293 · direnv/direnv_ https://github.com/direnv/direnv/issues/293
@ -0,0 +1,76 @@
---
Owner

Workflows need to go under .forgejo/workflows, we don't use github for CI. CI changes should also be in another PR.

Workflows need to go under `.forgejo/workflows`, we don't use github for CI. CI changes should also be in another PR.
@ -0,0 +1,116 @@
---
Owner

Workflows need to go under .forgejo/workflows, we don't use github for CI. CI changes should also be in another PR.

Workflows need to go under `.forgejo/workflows`, we don't use github for CI. CI changes should also be in another PR.
@ -0,0 +1,174 @@
---
Owner

Workflows need to go under .forgejo/workflows, we don't use github for CI. CI changes should also be in another PR.

Workflows need to go under `.forgejo/workflows`, we don't use github for CI. CI changes should also be in another PR.
@ -0,0 +1,255 @@
SHELL=/bin/bash
Owner

We don't use makefiles, you should ignore this in your VCS locally if you want to have your own

We don't use makefiles, you should ignore this in your VCS locally if you want to have your own
Author
Contributor

I tried that, but unfortunately it ended up getting deleted or falling out of sync between machines.

Until I familiarize myself with engage/Justfiles, such configuration changes as this are inevitable temporary artifacts on larger PRs. Please don't spend too much time on them, and know my focus is mostly on getting the code changes in prod code ironed out and streamlining the feedback process for rust changes. Even if it goes in, we can revert or even do a quick force push back

I tried that, but unfortunately it ended up getting deleted or falling out of sync between machines. Until I familiarize myself with engage/Justfiles, such configuration changes as this are inevitable temporary artifacts on larger PRs. Please don't spend too much time on them, and know my focus is mostly on getting the code changes in prod code ironed out and streamlining the feedback process for rust changes. Even if it goes in, we can revert or even do a quick force push back
bin/complement Outdated
@ -6,10 +6,10 @@ set -euo pipefail
COMPLEMENT_SRC="${COMPLEMENT_SRC:-$1}"
Owner

Complement changes are unrelated to this PR, please make them in a separate PR

Complement changes are unrelated to this PR, please make them in a separate PR
bin/complement Outdated
@ -51,2 +61,2 @@
go test -tags="conduwuit_blacklist" -skip="$SKIPPED_COMPLEMENT_TESTS" -v -timeout 1h -json ./tests/... | tee "$LOG_FILE"
set -o pipefail
if [ "$HAS_GOTESTSUM" = true ]; then
# gotestsum writes full JSON logs
Owner

How is this any different to go test -json?

How is this any different to `go test -json`?
Author
Contributor

gotestsum differs primarily by producing more human-readable output, which displays in color-coded ANSI log format, at least on GitHub.

We probably do not want to run them with verbose logging by default, since people can do that in Docker. Verbose logging in CI results in log files 50 MB or more, and quite naturally both GitHub and Forge struggle with rendering that, and will often truncate it after extreme lag in the browser tab.

I am conscious of the fragile, ugly nature of the if-else statement in the bash script, however given the convenience it confers, I am inclined to believe its merits must exceed the risks.

`gotestsum` differs primarily by producing more human-readable output, which displays in color-coded ANSI log format, at least on GitHub. We probably do not want to run them with verbose logging by default, since people can do that in Docker. Verbose logging in CI results in log files 50 MB or more, and quite naturally both GitHub and Forge struggle with rendering that, and will often truncate it after extreme lag in the browser tab. I am conscious of the fragile, ugly nature of the `if-else` statement in the `bash` script, however given the convenience it confers, I am inclined to believe its merits must exceed the risks.
@ -0,0 +1 @@
Implemented transactional wrappers around room joins and other key database operations to guarantee atomicity. This mitigates previously silent race conditions where partial state was written (fixes #1142 "Room has no state" sync error).
Owner

This file is named wrong, and this file is also unrelated to this PR

This file is named wrong, and this file is also unrelated to this PR
@ -0,0 +1 @@
The `roomsynctoken_shortstatehash` table — responsible for 60% to 90% of database bloat — has been removed. Sync state is now computed statelessly from the timeline on each request, eliminating the per-room write on every sync response. Existing table data is orphaned on disk and can be reclaimed by a future database compaction. Ref: [#917](https://forgejo.ellis.link/continuwuation/continuwuity/issues/917)
Owner

This is probably a bit too technical for a changelog. Also the file is named wrong.

This is probably a bit too technical for a changelog. Also the file is named wrong.
@ -6,12 +6,18 @@
# ============================================= #
Owner

Complement changes are unrelated to this PR, please make them in a separate PR

Complement changes are unrelated to this PR, please make them in a separate PR
@ -0,0 +1,6 @@
{"ImportPath":"./tests/...","Action":"build-output","Output":"# ./tests/...\n"}
Owner

Complement changes are unrelated to this PR, please make them in a separate PR. Also I don't think this needs including in VCS

Complement changes are unrelated to this PR, please make them in a separate PR. Also I don't think this needs including in VCS
@ -1286,3 +1290,3 @@
#allow_legacy_media = true
# This item is undocumented. Please contribute documentation for it.
# Disallow remote legacy media downloading. If set to true, requests for
Owner

This change seems unrelated to this PR.

This change seems unrelated to this PR.
@ -320,0 +319,4 @@
.config
.yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse;
if services.firstrun.is_first_run() && !open_registration {
Owner

This change is unrelated to this PR.

This change is unrelated to this PR.
@ -115,3 +114,3 @@
content_type,
content_disposition,
} = fetch_thumbnail(&services, &mxc, user, body.timeout_ms, &dim).await?;
} = match fetch_thumbnail(&services, &mxc, Some(user), body.timeout_ms, &dim).await {
Owner

This change is unrelated to this PR

This change is unrelated to this PR
@ -164,3 +164,3 @@
| _ =>
if !services.globals.server_is_ours(&body.server_name) && body.allow_remote {
let response = services
debug_info!(%mxc, "Fetching remote media via authenticated federation fallback");
Owner

This change is unrelated to this PR

This change is unrelated to this PR
@ -383,0 +380,4 @@
// Parallel discovery: Kick off make_join to multiple servers at once.
// The first one to return a valid stub wins and we try to finish the join with
// them.
let last_error = Arc::new(tokio::sync::Mutex::new(None));
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -288,3 +288,3 @@
let make_leave_response = services
.sending
.send_federation_request(
.send_synapse_request(
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -141,3 +141,3 @@
.wide_filter_map(|item| visibility_filter(&services, item, sender_user))
.take(limit)
.then(async |mut pdu| {
.wide_then(move |mut pdu| async move {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -85,3 +85,3 @@
})
},
| _ => Err!(Request(NotFound("Presence state for this user was not found"))),
| _ => {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -413,3 +409,1 @@
warn!(%user_id, %room_id, "Failed to update/send new profile join membership update in room: {e}");
}
}
all_joined_rooms
Owner

This change seems unrelated to this PR and is also bad idea

This change seems unrelated to this PR and is also bad idea
@ -31,3 +31,3 @@
if !visible || is_ignored_pdu(services, &event, body.sender_user()).await? {
return Err!(Request(Forbidden("You don't have permission to view this event.")));
return Err!(Request(NotFound("Event not found.")));
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -349,3 +349,3 @@
.await
.map_err(|e| {
err!(Request(Unknown("Failed resolving alias \"{alias}\": {e}")))
err!(Request(BadAlias("Failed resolving alias \"{alias}\": {e}")))
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -298,11 +319,26 @@ async fn build_state_and_timeline(
// history
let prev_batch = timeline.pdus.front().map(at!(0));
let user_has_join_event_in_sync = timeline
Owner

the way you calculate this means profile updates will cause limited timelines

the way you calculate this means profile updates will cause limited timelines
@ -628,0 +703,4 @@
.ok();
// If we can resolve the previous membership event, check if it was Join.
// If we couldn't resolve it (None), default to false (not a fresh join)
Owner

None => Join is a fresh join

`None => Join` is a fresh join
@ -628,0 +712,4 @@
);
if joined_since_last_sync && membership_during_previous_sync.is_some() {
warn!(
Owner

There's no log content here

There's no log content here
@ -272,2 +273,2 @@
.await
.ok()
.broad_filter_map(|event_id: OwnedEventId| async move {
services.rooms.timeline.get_pdu(&event_id).await.ok()
Owner

This can return outlier PDUs which should never be sent to the client

This can return outlier PDUs which should never be sent to the client
@ -149,12 +149,12 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
.ruma_route(&client::search_events_route)
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -93,1 +93,4 @@
// if the body is not empty and not media, but json parsing failed, it is
// invalid JSON
if json_body.is_none()
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -366,3 +366,2 @@
let msg = match e.reason() {
| TypedHeaderRejectionReason::Missing => "Missing Authorization header.",
| TypedHeaderRejectionReason::Error(_) => "Invalid X-Matrix signatures.",
| TypedHeaderRejectionReason::Missing => "Missing Authorization header",
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -21,2 +21,4 @@
where
H: RumaHandler<T>;
fn ruma_route_path<H, T>(self, handler: &'static H, path: &str) -> Self
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -259,3 +259,3 @@
}
},
| AllowRule::UnstableSpamChecker =>
| AllowRule::UnstableSpamChecker => {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -359,6 +359,9 @@ async fn handle_room(
}
async fn handle_edu(services: &Services, client: &IpAddr, origin: &ServerName, edu: Edu) {
if services.server.check_running().is_err() {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -46,15 +46,28 @@ pub(super) async fn check(&self) -> Result {
join!(world_readable, server_in_room, server_can_see, acl_check);
if !acl_check {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -14,1 +12,3 @@
# name = "conduwuit_build_metadata"
[[bin]]
name = "conduwuit-version"
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -1,25 +1,17 @@
use std::process::Command;
#[path = "src/git.rs"]
mod git;
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -27,3 +23,2 @@
pub static GIT_REMOTE_COMMIT_URL: Option<&str> = option_env!("GIT_REMOTE_COMMIT_URL");
// TODO: Mark dirty builds within the version string
pub static GIT_REMOTE_URL: Option<&str> = option_env!("GIT_REMOTE_URL");
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -0,0 +1,11 @@
#[path = "../git.rs"]
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -0,0 +1,54 @@
use std::process::Command;
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -2787,3 +2798,3 @@
fn default_client_response_timeout() -> u64 { 120 }
fn default_client_shutdown_timeout() -> u64 { 15 }
fn default_client_shutdown_timeout() -> u64 { 10 }
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -157,6 +157,14 @@ macro_rules! err_lev {
}
};
(info) => {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -70,3 +70,3 @@
#[inline]
pub fn inspect_debug_log<E: fmt::Debug>(error: &E) {
inspect_debug_log_level(error, Level::ERROR);
inspect_debug_log_level(error, Level::WARN);
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -132,2 +132,4 @@
Uiaa(ruma::api::client::uiaa::UiaaInfo),
// federation / remote
#[error("Federation timeout: {0}")]
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -16,3 +16,3 @@
fn into_response(self) -> axum::response::Response {
let status = self.status_code();
if status.is_server_error() {
if status == StatusCode::INTERNAL_SERVER_ERROR {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -28,2 +30,4 @@
#[inline]
#[must_use]
pub fn git_remote_commit_url() -> &'static str {
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -467,3 +467,3 @@
if !matches!(membership_state, MembershipState::Join) {
warn!(
info!(
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
@ -692,3 +691,3 @@
);
} else {
warn!(event_id = aid.as_str(), "missing auth event");
info!(event_id = aid.as_str(), "missing auth event");
Owner

This change seems unrelated to this PR

This change seems unrelated to this PR
Author
Contributor

I have added a method to rescue outlier PDUs. I am just pushing things here still as I fix or create them. (This branch is still pending cleanup and the resolution of two or three serious bugs).

I also naturally added methods to filter by room and sender, however, the database was implemented without indexes as a simple Key-Value store, so this is just a full linear scan (quite slow when cold and not cached or warm).

I had a lot of outliers on my development/test account, and I wanted a mechanism to clean them up. Example commands here. Second rescue is shorter due to being in the same room, very close to the first one.

Lack of index on timestamp makes ordering of the chat difficult. So i also added the ability to index a room, playing with that.

uwu> debug rescue-pdu $9537euCX3wBFxV2CUlOFxFurpPGYEIxvbYHuAuSjza0
2026-03-05T01:19:20.559061Z  INFO admin:command: conduwuit_service::rooms::state: force_state room_id=!D1J4GsCJBfrgJ0aXT0:nutra.tk shortstatehash=3688912 added=0 removed=0
2026-03-05T01:19:20.866098Z  INFO admin:command: conduwuit_service::rooms::event_handler::upgrade_outlier_pdu: Accepted elapsed=3.892783095s
│level│              span              │                      message                       │
├─────┼────────────────────────────────┼────────────────────────────────────────────────────┤
│DEBUG│            command             │Upgrading PDU from outlier to timeline              │
│DEBUG│            command             │Resolving state at event                            │
│DEBUG│             state              │Using cached state                                  │
│DEBUG│            command             │Performing auth check to upgrade                    │
│DEBUG│            command             │Running initial auth check                          │
│DEBUG│           auth_check           │auth_check beginning                                │
│DEBUG│           auth_check           │starting m.room.member check                        │
│DEBUG│           auth_check           │m.room.member event was allowed                     │
│DEBUG│            command             │Gathering auth events                               │
│DEBUG│        get_auth_events         │Auth types for event                                │
│DEBUG│        get_auth_events         │Auth events to fetch                                │
│DEBUG│        get_auth_events         │Auth events found in state                          │
│DEBUG│            command             │Running auth check with claimed state auth          │
│DEBUG│           auth_check           │auth_check beginning                                │
│DEBUG│           auth_check           │starting m.room.member check                        │
│DEBUG│           auth_check           │m.room.member event was allowed                     │
│DEBUG│            command             │Performing soft-fail check                          │
│DEBUG│            command             │Retained 2 extremities checked against 1 prev_events│
│DEBUG│            command             │Event is a state-event. Deriving new room state     │
│DEBUG│           auth_chain           │start                                               │
│DEBUG│           auth_chain           │start                                               │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │done                                                │
│DEBUG│           auth_chain           │Cache missed event                                  │
│DEBUG│           auth_chain           │Cache missed chunk                                  │
│DEBUG│           auth_chain           │done                                                │
│DEBUG│              ruma              │State resolution starting                           │
│DEBUG│              ruma              │non-conflicting events                              │
│DEBUG│              ruma              │conflicting events                                  │
│DEBUG│              ruma              │full conflicted set                                 │
│DEBUG│ reverse_topological_power_sort │reverse topological sort of power events            │
│DEBUG│lexicographical_topological_sort│starting lexicographical topological sort           │
│DEBUG│              ruma              │power events                                        │
│DEBUG│      iterative_auth_check      │starting iterative auth check                       │
│DEBUG│      iterative_auth_check      │no events to check, returning unconflicted state    │
│DEBUG│              ruma              │resolved power events                               │
│DEBUG│              ruma              │deduped power events                                │
│DEBUG│              ruma              │events left to resolve                              │
│DEBUG│              ruma              │mainline sort of events                             │
│DEBUG│              ruma              │mainline                                            │
│DEBUG│              ruma              │mainline                                            │
│DEBUG│              ruma              │mainline                                            │
│DEBUG│              ruma              │mainline                                            │
│DEBUG│      iterative_auth_check      │starting iterative auth check                       │
│DEBUG│      iterative_auth_check      │Running auth checks                                 │
│DEBUG│           auth_check           │auth_check beginning                                │
│DEBUG│           auth_check           │starting m.room.member check                        │
│DEBUG│           auth_check           │m.room.member event was allowed                     │
│DEBUG│      iterative_auth_check      │Running auth checks                                 │
│DEBUG│           auth_check           │auth_check beginning                                │
│DEBUG│           auth_check           │starting m.room.member check                        │
│DEBUG│           auth_check           │m.room.member event was allowed                     │
│DEBUG│      iterative_auth_check      │iterative auth check finished                       │
│DEBUG│              ruma              │state resolution finished                           │
│DEBUG│            command             │Forcing new room state                              │
│ INFO│            command             │force_state                                         │
│DEBUG│           append_pdu           │Resetting notification counts                       │
│ INFO│            command             │Accepted                                            │

Successfully rescued PDU.

uwu> debug rescue-pdu $s7qNBMf4UtoNaSJbDyeC4ElYM0uEAaF7vbzistlS2p0
2026-03-05T01:19:45.082062Z  INFO admin:command: conduwuit_service::rooms::event_handler::upgrade_outlier_pdu: Accepted elapsed=45.722291ms
│level│     span      │                      message                       │
├─────┼───────────────┼────────────────────────────────────────────────────┤
│DEBUG│    command    │Upgrading PDU from outlier to timeline              │
│DEBUG│    command    │Resolving state at event                            │
│DEBUG│     state     │Using cached state                                  │
│DEBUG│    command    │Performing auth check to upgrade                    │
│DEBUG│    command    │Running initial auth check                          │
│DEBUG│  auth_check   │auth_check beginning                                │
│DEBUG│  auth_check   │permissions factors                                 │
│DEBUG│  auth_check   │allowing event passed all checks                    │
│DEBUG│    command    │Gathering auth events                               │
│DEBUG│get_auth_events│Auth types for event                                │
│DEBUG│get_auth_events│Auth events to fetch                                │
│DEBUG│get_auth_events│Auth events found in state                          │
│DEBUG│    command    │Running auth check with claimed state auth          │
│DEBUG│  auth_check   │auth_check beginning                                │
│DEBUG│  auth_check   │permissions factors                                 │
│DEBUG│  auth_check   │allowing event passed all checks                    │
│DEBUG│    command    │Performing soft-fail check                          │
│DEBUG│    command    │Retained 2 extremities checked against 1 prev_events│
│DEBUG│  append_pdu   │Resetting notification counts                       │
│DEBUG│  append_pdu   │Incremented notification count                      │
│ INFO│    command    │Accepted                                            │

Successfully rescued PDU.
I have added a method to rescue outlier `PDUs`. I am just pushing things here still as I fix or create them. (This branch is still pending cleanup and the resolution of two or three serious bugs). I also naturally added methods to filter by `room` and `sender`, however, the database was implemented without indexes as a simple Key-Value store, so this is just a full linear scan (quite slow when cold and not cached or warm). I had a lot of outliers on my development/test account, and I wanted a mechanism to clean them up. Example commands here. Second rescue is shorter due to being in the same room, very close to the first one. Lack of index on timestamp makes ordering of the chat difficult. So i also added the ability to index a room, playing with that. ```log uwu> debug rescue-pdu $9537euCX3wBFxV2CUlOFxFurpPGYEIxvbYHuAuSjza0 2026-03-05T01:19:20.559061Z INFO admin:command: conduwuit_service::rooms::state: force_state room_id=!D1J4GsCJBfrgJ0aXT0:nutra.tk shortstatehash=3688912 added=0 removed=0 2026-03-05T01:19:20.866098Z INFO admin:command: conduwuit_service::rooms::event_handler::upgrade_outlier_pdu: Accepted elapsed=3.892783095s │level│ span │ message │ ├─────┼────────────────────────────────┼────────────────────────────────────────────────────┤ │DEBUG│ command │Upgrading PDU from outlier to timeline │ │DEBUG│ command │Resolving state at event │ │DEBUG│ state │Using cached state │ │DEBUG│ command │Performing auth check to upgrade │ │DEBUG│ command │Running initial auth check │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │starting m.room.member check │ │DEBUG│ auth_check │m.room.member event was allowed │ │DEBUG│ command │Gathering auth events │ │DEBUG│ get_auth_events │Auth types for event │ │DEBUG│ get_auth_events │Auth events to fetch │ │DEBUG│ get_auth_events │Auth events found in state │ │DEBUG│ command │Running auth check with claimed state auth │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │starting m.room.member check │ │DEBUG│ auth_check │m.room.member event was allowed │ │DEBUG│ command │Performing soft-fail check │ │DEBUG│ command │Retained 2 extremities checked against 1 prev_events│ │DEBUG│ command │Event is a state-event. Deriving new room state │ │DEBUG│ auth_chain │start │ │DEBUG│ auth_chain │start │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │done │ │DEBUG│ auth_chain │Cache missed event │ │DEBUG│ auth_chain │Cache missed chunk │ │DEBUG│ auth_chain │done │ │DEBUG│ ruma │State resolution starting │ │DEBUG│ ruma │non-conflicting events │ │DEBUG│ ruma │conflicting events │ │DEBUG│ ruma │full conflicted set │ │DEBUG│ reverse_topological_power_sort │reverse topological sort of power events │ │DEBUG│lexicographical_topological_sort│starting lexicographical topological sort │ │DEBUG│ ruma │power events │ │DEBUG│ iterative_auth_check │starting iterative auth check │ │DEBUG│ iterative_auth_check │no events to check, returning unconflicted state │ │DEBUG│ ruma │resolved power events │ │DEBUG│ ruma │deduped power events │ │DEBUG│ ruma │events left to resolve │ │DEBUG│ ruma │mainline sort of events │ │DEBUG│ ruma │mainline │ │DEBUG│ ruma │mainline │ │DEBUG│ ruma │mainline │ │DEBUG│ ruma │mainline │ │DEBUG│ iterative_auth_check │starting iterative auth check │ │DEBUG│ iterative_auth_check │Running auth checks │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │starting m.room.member check │ │DEBUG│ auth_check │m.room.member event was allowed │ │DEBUG│ iterative_auth_check │Running auth checks │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │starting m.room.member check │ │DEBUG│ auth_check │m.room.member event was allowed │ │DEBUG│ iterative_auth_check │iterative auth check finished │ │DEBUG│ ruma │state resolution finished │ │DEBUG│ command │Forcing new room state │ │ INFO│ command │force_state │ │DEBUG│ append_pdu │Resetting notification counts │ │ INFO│ command │Accepted │ Successfully rescued PDU. uwu> debug rescue-pdu $s7qNBMf4UtoNaSJbDyeC4ElYM0uEAaF7vbzistlS2p0 2026-03-05T01:19:45.082062Z INFO admin:command: conduwuit_service::rooms::event_handler::upgrade_outlier_pdu: Accepted elapsed=45.722291ms │level│ span │ message │ ├─────┼───────────────┼────────────────────────────────────────────────────┤ │DEBUG│ command │Upgrading PDU from outlier to timeline │ │DEBUG│ command │Resolving state at event │ │DEBUG│ state │Using cached state │ │DEBUG│ command │Performing auth check to upgrade │ │DEBUG│ command │Running initial auth check │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │permissions factors │ │DEBUG│ auth_check │allowing event passed all checks │ │DEBUG│ command │Gathering auth events │ │DEBUG│get_auth_events│Auth types for event │ │DEBUG│get_auth_events│Auth events to fetch │ │DEBUG│get_auth_events│Auth events found in state │ │DEBUG│ command │Running auth check with claimed state auth │ │DEBUG│ auth_check │auth_check beginning │ │DEBUG│ auth_check │permissions factors │ │DEBUG│ auth_check │allowing event passed all checks │ │DEBUG│ command │Performing soft-fail check │ │DEBUG│ command │Retained 2 extremities checked against 1 prev_events│ │DEBUG│ append_pdu │Resetting notification counts │ │DEBUG│ append_pdu │Incremented notification count │ │ INFO│ command │Accepted │ Successfully rescued PDU. ```
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	bin/complement
#	complement/complement.config.toml
#	src/core/error/mod.rs
#	src/service/media/remote.rs
#	src/service/sending/sender.rs
#	src/service/users/mod.rs
fix: revert .0 suffix from stateless version bump

Revert "fix: revert .0 suffix from stateless version bump"

This reverts commit 646be79a6d67477f04b0d7b6fc9d17c9b3d65f35.

fix: change to 0.5.6-beta.stateless.0 per user request
enhance the `debug rescue-pdu` command with various useful filtering parameters
fix(cli): uwu enable SIGINT (Ctrl+C) mid-command
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Complement Tests / complement-tests (pull_request) Failing after 32s
Update flake hashes / update-flake-hashes (pull_request) Successful in 30s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m12s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 1h0m0s
076b3b37d7
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Complement Tests / complement-tests (pull_request) Failing after 32s
Update flake hashes / update-flake-hashes (pull_request) Successful in 30s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m12s
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 1h0m0s
Required
Details
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u guru/experiment/stateless-sync-purge-sync-tokens:gamesguru-guru/experiment/stateless-sync-purge-sync-tokens
git switch gamesguru-guru/experiment/stateless-sync-purge-sync-tokens
Sign in to join this conversation.
No reviewers
nex
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1456
No description provided.