aboutsummaryrefslogtreecommitdiff
path: root/bandwidth-file-spec.txt
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2018-07-18 11:49:16 +1000
committerteor <teor2345@gmail.com>2018-07-18 11:49:16 +1000
commitcc7ef26f026170990ac11e41baa30c156a2464f5 (patch)
tree62fd7257be58e76301f32509fc726ed226354a60 /bandwidth-file-spec.txt
parent1fb4cb58e98af3d4ac153efe6d0ddc43665d9a74 (diff)
downloadtorspec-cc7ef26f026170990ac11e41baa30c156a2464f5.tar.gz
torspec-cc7ef26f026170990ac11e41baa30c156a2464f5.zip
bandwidth-file-spec: files should be generated atomically
Closes 26829.
Diffstat (limited to 'bandwidth-file-spec.txt')
-rw-r--r--bandwidth-file-spec.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index 0b2c7af..9a3f63f 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -358,11 +358,25 @@ In version 1.1.0, the KeyValue can be in any arbitrary order.
header format.
If there are, the parser MAY ignore conflicting keywords.
-2.4. Implementation notes
+2.4. Implementation details
+
+2.4.1 Writing bandwidth files atomically
+
+To avoid inconsistent reads, implementations SHOULD write bandwidth files
+atomically. If the file is transferred from another host, it SHOULD be
+written to a temporary path, then renamed to the V3BandwidthsFile path.
+
+sbws versions 0.7.0 and later write the bandwidth file to an archival location,
+create a temporary symlink to that location, then atomically rename the symlink
+to the configured V3BandwidthsFile path.
+
+Torflow does not write bandwidth files atomically.
+
+2.4.2. Additional KeyValue pair definitions
KeyValue pairs in RelayLines that current implementations generate.
-2.4.1. Simple Bandwidth Scanner
+2.4.2.1. Simple Bandwidth Scanner
Every RelayLine in sbws version 0.1.0 consists of:
@@ -421,7 +435,7 @@ Every RelayLine in sbws version 0.1.0 consists of:
The number of times that the bandwidth measurements for this relay
failed because of other reasons.
-2.4.2. Torflow
+2.4.2.2. Torflow
Torflow RelayLines include node_id and bw, and other KeyValue pairs [2].