diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-06 14:24:04 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-06 14:24:04 +0100 |
| commit | 355c8ae57d582974f4f6a4ba42f635f2253b84a7 (patch) | |
| tree | 81536ae109b37242217c818ae3a6b2c193fb8ff3 /DESIGN | |
| parent | 367ff65242ca88fd6435d04a577a43cec5de92fe (diff) | |
Add a wall clock helper so that statedumps can be written and re-read
Diffstat (limited to 'DESIGN')
| -rw-r--r-- | DESIGN | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -103,6 +103,15 @@ ordinary announce interval is a constant too and an operator has nothing to | |||
| 103 | measure a different value against. Over HTTP a refusal stays a failure | 103 | measure a different value against. Over HTTP a refusal stays a failure |
| 104 | reason, which is the only place a user is told why. | 104 | reason, which is the only place a user is told why. |
| 105 | 105 | ||
| 106 | The state file keeps a wall clock minute, and it is the only thing in the | ||
| 107 | tracker that reads that clock. Everything else runs off a monotonic one, | ||
| 108 | where a time step cannot evict a swarm, but a file outlives the process that | ||
| 109 | wrote it and minutes since this boot mean nothing to the next run. So the | ||
| 110 | dump converts on the way out and load_state converts on the way back in, and | ||
| 111 | what lands on disk is the format opentracker has written for years. A step | ||
| 112 | between writing and reading mis-dates a torrent by the size of the step, | ||
| 113 | which costs it part of its last day and nothing else. | ||
| 114 | |||
| 106 | Startup and teardown order | 115 | Startup and teardown order |
| 107 | -------------------------- | 116 | -------------------------- |
| 108 | 117 | ||
