Skip to content

Avenue (v4.3beta11)

Pre-release
Pre-release

Choose a tag to compare

@lewisgoddard lewisgoddard released this 12 Sep 04:47
· 12 commits to main since this release

Phoenix v4.3beta11 is the largest release of the 4.3 line. Four new admin surfaces — Clients, Task History, per-country Bandwidth and the sidebar's server gauges — arrive alongside a rebuilt Bandwidth page and paged, SQL-backed Torrents, Peers and Bandwidth listings that no longer load a whole table to render a page. Beneath that, the storage engine moves to InnoDB, backups become a directory of per-table files you can restore selectively, and scheduled maintenance splits by cost so a full table rebuild stops running every fifteen minutes. This release breaks things — read the warnings below before upgrading.

Upgrade Warnings

  • Every table is now InnoDB. db_create() only creates missing tables, so an existing database keeps whatever engine it has. Convert each one during a quiet window — every ALTER rebuilds the table and holds it locked for the duration:

    ALTER TABLE `phoenix_events`    ENGINE=InnoDB;
    ALTER TABLE `phoenix_peers`     ENGINE=InnoDB;
    ALTER TABLE `phoenix_tasks`     ENGINE=InnoDB;
    ALTER TABLE `phoenix_task_runs` ENGINE=InnoDB;
    ALTER TABLE `phoenix_torrents`  ENGINE=InnoDB;
  • The API's traffic field is now bandwidth, in the JSON, XML and scrape responses. The Traffic page is renamed Bandwidth all the way down — route, setting, models, sort key and chart. Update any client reading that field, and any bookmark to ?page=traffic.

  • Both maintenance cron entries change. bin/clean-and-optimize.php is now bin/prune-database.php, and the new bin/optimize-database.php runs the rebuild on its own slower schedule. Update your crontab:

    */15 * * * * php ~/phoenix/bin/prune-database.php
    15  3 * * * php ~/phoenix/bin/optimize-database.php
    30  3 * * * php ~/phoenix/bin/backup-database.php
  • The admin page-size settings are renamed from _limit to _rows: admin_peers_rows, admin_torrents_rows, admin_tasks_rows, admin_bandwidth_rows. They set how many rows a page shows, which "limit" reads as a cap on. Update these in your config.

  • Backups are now a directory per run, holding schema.sql and one data file per table. Existing single-file backups still list, download and rotate. Anything that picks up the newest *.sql.gz by glob needs rewriting.

  • sql/migrations/ is empty. Every 3.x/4.x migration is folded into sql/*.sql. Upgrading a database older than 4.3? Apply the migrations from a v4.3beta10 checkout first, then move to this release.

  • Geo enrichment needs a different library. Run composer require maxmind-db/reader in place of geoip2/geoip2, and install ext-maxminddb if your distribution packages it — the pure-PHP reader is around 40× slower.

  • Tracker stats report the bare version, dropping the $Id: … $, wrapper. A client stripping that wrapper should stop.

Feature

  • A Clients page, breaking the swarm down by client family and version. Versions group by major release, so a family with a long tail reads as one bar per major with the individual builds in the tooltip.
  • A Task History page — the log behind the dashboard's Maintenance block, which had been written since 4.3 and never read. The column worth reading is "Triggered by": cron means the scheduled job fired, auto means an announce paid for the cleanup inline, admin means someone pressed a button. A history of auto where cron was expected is the signal that the crontab entry is not running.
  • CPU, memory, swap and disk gauges in the sidebar, with the detail on hover. Every metric keeps its row whether or not the host lets it be read, so swap that is switched off shows "Off" rather than vanishing.
  • Overdue and never-run maintenance is flagged on the dashboard and in the sidebar, against configurable thresholds. A task that has never run is called out separately: a stale task usually means cron stopped, a never-run one usually means the entry was never added.
  • Bandwidth by country, alongside active peers and completed downloads on Geography.
  • DB Utilities gains Analyze and Check, so each maintenance statement is reachable by hand.
  • Delete a backup from the panel, and download each file in one individually.
  • Server Support reports the optional extras — which geo reader is live and where its database is, whether Sentry and 2FA are configured, whether gzip is available for backups — warning on a slow geo reader and on a panel with no second factor.
  • The Sentry hooks ship wired rather than commented out. Set report_errors and sentry_dsn and errors arrive tagged with which part of the tracker failed.
  • Filenames and info hashes show alongside every torrent name, on the dashboard, Torrents, Peers and Bandwidth.

Improvement

  • Torrents, Peers and Bandwidth page, search and sort in SQL rather than loading the table and filtering in the browser. Each pages against a filtered total, so a filtered list no longer trails off into empty pages, and meta a row does not show as a column is still searchable.
  • The closed-tracker permission check is one indexed query instead of a read of every registered info hash — which at 200k torrents cost 48.8 MB and 57 ms per announce to answer a question about one of them. The same query serves multi-hash scrapes.
  • Geo lookups are 73× faster. The reader was being constructed per call (~159 µs against a ~9 µs lookup) and the model objects cost more than the lookup they wrapped. With ext-maxminddb, an announce's geo enrichment falls from 606 µs to 7.5 µs.
  • The dashboard cards link into the listings they summarise, ranked as they rank, so the dashboard is a way in rather than a dead end.
  • The maintenance action is called Prune, not Clean: it drops stale peers, expired events and task history, and "clean" collides with InnoDB's own clean/dirty page vocabulary.
  • Nine more client codes, each agreed by two independent implementations, and the code table replaced with the BEP 20 registry.
  • Charts are theme-aware, on load and on toggle.

Bugfix

  • Maintenance failures are noticed. CHECK/ANALYZE/OPTIMIZE report problems as rows inside their result sets while mysqli_errno() stays 0 and mysqli_multi_query() returns true, so a rebuild that died partway still logged a successful run.
  • REPAIR TABLE is dropped from maintenance. On MariaDB it reports status: OK on an InnoDB table and performs a full rebuild of its own, so pairing it with OPTIMIZE rebuilt every table twice for one table's worth of benefit.
  • The last row a filter leaves showing no longer doubles its border against the card's edge, on the admin tables and on the public index.
  • Devtools can fetch the CDN source maps again, which connect-src was blocking.
  • lucide moves to jsDelivr and unpkg leaves the CSP, with every CDN script pinned by integrity hash (#78).
  • Request state stays off the Settings page — the nav counts, alerts and server gauges ride in $settings so the layout can render without I/O, and were being listed as though an operator had set them.
  • The Bandwidth page marks its selected window, which compared a string against keys PHP had already coerced to ints.
  • The filename truncation threshold is measured in UTF-8 explicitly, rather than following an internal encoding that differs between hosts.
  • Chrome no longer offers to save the TOTP code as a username.

Documentation

  • API.md — every HTTP endpoint, with parameters, JSON and XML shapes, errors, and a summary table.
  • LIMITS.md — measured ceilings: how many peers and torrents an install carries, what binds first, and what InnoDB costs.
  • CONFIGURATION.md and RECOVERY.md, split out of the README — every operator setting, and admin lockout, 2FA removal and backup restore.

Supporting

  • Test coverage filled in across the models and controllers the report showed at zero, the geo lookup's gate and corrupt-database path, and the dashboard's two ranking models.

Changes

v4.3beta10 to v4.3beta11