Repository navigation
docs(postmortem): close the data-centre notification action - #173
Merged
Merged
Conversation
Move ticket marking out of add_entry. Startup journal loading still marks each entry in order; after a new reports_record result, the hub marks the ticket under store_lock before updating status and metrics or replying. The ticket store is read under store_lock during requests, and the report lock is never held with it. Behaviour is unchanged: admission was already thread-safe and the store does not change at run time today. Document the lock order and startup journal marking.
The hub still rejects a signed ticket found only in the synced season list, although a successful sync should make that list available for decisions. After the start file changes in place, /tickets serves its new bytes while scans still use the loaded list; both should use the same snapshot. Growing or shrinking the file during a /tickets reply changes the bytes sent, and a short reply is counted as 200; the reply should contain the loaded list and be counted accurately.
The hub synced a list it never used for decisions, while /tickets reread the start file on every request. A header-time ETag could leave the hub on an old list behind repeated 304 replies. The hub now syncs /season.txt, checks the installed body before conditional requests, and switches decisions and /tickets together using a reference-counted snapshot. It carries used admissions and recorded offline reports across a switch. Here verified means the downloaded file SHA-256 matches the confirmed ETag, the whole list loads under the start-file rules, and the file and its directory have been synced.
After the hub fix, the hub takes its season list from the data centre and serves the verified in-memory list. Drills that rewrote the hub start file and restarted it now publish their extra tickets from the data centre. The drills wait for installation and restore the previous publication during cleanup.
…LS status port With the season list at about 3.5 MB, a north gate whose download is lost in a path-MTU black hole keeps the hub's single TLS status listener busy for about six seconds once per 20-second fetch cycle. Venue gates that ask during that time give up after 300 ms. The drill fails until 8444 serves more than one connection at a time.
… every gate Port 8444 serves one connection at a time, so a client that asks for /tickets and stops reading makes every other gate wait seconds for /status. A connection beyond the work queue should be closed at once and counted.
…ist-version test If the gate fetches the new list after the hub installs it and before the test reads the metrics, the assertion that the gate became stale does not hold. Pausing the gate while the hub changes its list removes that window.
Port 8444 served one connection at a time, so one client that stopped reading held /status and ticket fetches for every gate for seconds. It now hands accepted connections to a bounded queue of 16 served by four workers, closes and counts a connection when the queue is full, and keeps the 2 s step and 10 s connection deadlines. Port 8081 stays one thread for staff. The TLS slow-reader check in the status deadline test described the one-thread behaviour: status waited until the slow reader was cut; it now requires an answer within 1 s.
The hub now mails when the data centre is unreachable or the uplink watcher stops.
Contributor
Author
|
Noah Williams · reviewer Does this also close the shared-provider risk? 这是否也关闭了共用运营商路径的风险? |
Contributor
Author
|
Ingrid Larsen · author No. The completion applies only to human notification for data-centre and watcher failures; the other action rows remain open. 没有。这里仅完成数据中心与监视脚本故障的人员通知,其他行动项仍开放。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The previously overdue notification work now has implementation and verification references.
What changed
How to verify
From the repository root:
Check that every new relative link resolves and only the notification action is closed; provider independence and the probe gap remain separate.
背景
此前逾期的通知工作已有实现和验证依据。
改动
怎么验证
从仓库根目录运行:
确认新增相对链接均有效,只关闭通知事项;运营商路径独立性和探测缺口仍单独保留。