cmcfarlen opened a new pull request, #13522: URL: https://github.com/apache/trafficserver/pull/13522
Fourth round of cherry-picks for the 10.2.0 release candidate: #13328 and its prerequisite #13418, both at "For v10.2.0" in the [ATS v10.2.x project](https://github.com/orgs/apache/projects/573). | PR | Title | |---|---| | #13418 | Add traffic_ctl cache clear command | | #13328 | cache: shared-memory-backed Dir for fast restart | #13328 was deferred from round 3 because it could not be picked on its own. #13418 is the prerequisite: it introduces the `traffic_ctl cache` command group and the `CacheCommand` class that #13328's `cache shm status` / `cache shm clear` subcommands attach to. Picking #13328 alone left `traffic_ctl.cc` referencing an undeclared `cache_command` and an unknown `CacheCommand`, which the compiler caught but the merge did not. Both picked with `git cherry-pick -x` in master merge order. Three adaptations were needed; everything else applied unchanged. **1. `src/traffic_ctl/traffic_ctl.cc` (both picks) — dropped master-only command registrations.** Auto-merge tried to bring across the `config ssl-multicert` and `config convert` subcommand trees and an `#include "ConvertConfigCommand.h"`, none of which belong to either PR; they come from master's YAML config conversion work and their implementation files do not exist on this branch. Only each PR's own additions were taken. The resulting per-PR diff for this file is byte-identical to master's for both picks. **2. `src/traffic_ctl/CMakeLists.txt` (#13328) — same drag-in.** Auto-merge wanted `ConvertConfigCommand.cc` and `SSLMultiCertCommand.cc` alongside `CacheShmCommand.cc`; only the latter was taken. `cmake-format` then expanded the source list to one entry per line because adding it pushed the line past the width limit, so this file shows a larger diff than master's `+1`. The net content is the same: `CacheShmCommand.cc` added, no master-only entries. **3. The nine `cache_shm_*` autests — converted `storage.yaml` to `storage.config` + `volume.config`.** This branch's server reads `storage.config` and `volume.config` (`ts::filename::STORAGE` is `"storage.config"` here versus `"storage.yaml"` on master), and autest exposes `Disk.storage_config`/`Disk.volume_config` accordingly, so `Disk.storage_yaml` does not exist here. Each test's single span plus single volume becomes: ```python ts.Disk.storage_config.AddLine(f'{path} {size}') ts.Disk.volume_config.AddLine('volume=1 scheme=http size=100%') ``` `cache_shm_bad_disk_dropped` builds N spans in a loop and was converted to emit one `storage.config` line per span. Dropping the per-span `name:` field is safe for the shm mechanism: segments are keyed by `stripe_key_hash`, and `include/shared/cache_shm/Layout.h` states this explicitly — "segment on attach by stripe_key_hash, not by name (order-independent)". The remaining `storage.yaml` mentions in the picked files are all prose (docstrings, comments, and the developer guide); no test waits on a diags string or gold file containing it. Both adaptations were amended into their own picks rather than added as follow-up commits, so this branch is exactly two commits. **Verified locally:** build clean, and `ctest` is **167/167** — including the two unit tests #13328 adds, `test_cache_CacheShm` and `test_cache_CacheShmShutdown`, which exercise the new mechanism rather than merely compiling it. All eight `proxy.config.*` records the new autests reference resolve in `RecordsConfig.cc`, and no picked test uses a `Disk.*` attribute or `Test.*` helper missing from this branch. **Worth a separate decision, not addressed here:** the picked documentation describes the feature in terms of `storage.yaml`, which does not exist in 10.2.0 — `doc/admin-guide/files/records.yaml.en.rst` and the new `doc/developer-guide/cache-architecture/shm-fast-restart.en.rst`. That is user-facing text referring to a file operators on this release will not have. Left as-is rather than rewriting an 888-line guide inside a cherry-pick. Draft so the full CI matrix runs before the release branch moves; the nine adapted autests are the main thing to watch. It will be landed by fast-forward. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
