Skip to content

txn_box: Log text block reload failures#13411

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:txn-box-text-block-read-errors
Open

txn_box: Log text block reload failures#13411
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:txn-box-text-block-read-errors

Conversation

@bneradt

@bneradt bneradt commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Text blocks silently lose their file-backed content when a periodic
reload can no longer read the configured file. Requests then see an
empty block without an operator-visible diagnostic.

This logs the transition to unavailable content once and adds
regression coverage for a file that becomes unreadable. This also
documents the error and fallback behavior.

The original txn_box repository is defunct, so fixes for the plugin are
now tracked in the Traffic Server repository. This patch addresses:
SolidWallOfCode/txn_box#90

Text blocks silently lose their file-backed content when a periodic
reload can no longer read the configured file. Requests then see an
empty block without an operator-visible diagnostic.

This logs the transition to unavailable content once and adds
regression coverage for a file that becomes unreadable. This also
documents the error and fallback behavior.

The original txn_box repository is defunct, so fixes for the plugin are
now tracked in the Traffic Server repository. This patch addresses:
SolidWallOfCode/txn_box#90
Copilot AI review requested due to automatic review settings July 20, 2026 23:05
@bneradt bneradt added this to the 11.0.0 milestone Jul 20, 2026
@bneradt bneradt self-assigned this Jul 20, 2026
@bneradt bneradt added TxnBox TxnBox plugin Bug AuTest labels Jul 20, 2026
@bneradt bneradt removed the AuTest label Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves operator visibility for the experimental txn_box plugin’s file-backed text blocks by logging (once) when periodic reloads lose access to the configured file and the block content is cleared. It also adds a gold test to cover the “file becomes unreadable” scenario and updates the user documentation to describe the error/fallback behavior.

Changes:

  • Log a one-time ERROR when a periodic text-block reload fails after previously having file content (transition to unavailable content).
  • Add AuTest regression coverage that makes a configured text-block file unreadable during runtime and asserts the error is logged.
  • Update directive reference documentation to clarify behavior when the file disappears or becomes unreadable.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugins/experimental/txn_box/plugin/src/text_block.cc Logs the transition from available file content to unavailable content when reload fails, without holding the content lock during logging.
tests/gold_tests/pluginTest/txn_box/static_file/txn_box_static_file.test.py Adds a runtime permission-change step and asserts the expected error appears in diags.log.
tests/gold_tests/pluginTest/txn_box/static_file/static_file.replay.yaml Defines an unreadable text block with a short reload period to exercise the failure path.
tests/gold_tests/pluginTest/txn_box/static_file/unreadable.txt Adds the file used by the new unreadable-file regression scenario.
doc/admin-guide/plugins/txn_box/user/DirectiveReference.en.rst Documents the logged error and fallback behavior when a file becomes unreadable during update checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug TxnBox TxnBox plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants