aboutsummaryrefslogtreecommitdiff
path: root/src/net/message.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-03-28 15:01:05 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-28 15:01:05 +0100
commit8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860 (patch)
tree49d6c32376708147e90ba64ea32cea7835e751c1 /src/net/message.rs
parent25c196f34d958f4f61d50c89a1c5d40b96d7cd24 (diff)
parentecf641d88c264f7278d13a6d988288feb24a5dfe (diff)
downloadgarage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.tar.gz
garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.zip
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/net/message.rs')
-rw-r--r--src/net/message.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/message.rs b/src/net/message.rs
index b0d255c6..af98ca12 100644
--- a/src/net/message.rs
+++ b/src/net/message.rs
@@ -28,12 +28,30 @@ use crate::util::*;
/// The same priority value is given to a request and to its associated response.
pub type RequestPriority = u8;
+// Usage of priority levels in Garage:
+//
+// PRIO_HIGH
+// for liveness check events such as pings and important
+// reconfiguration events such as layout changes
+//
+// PRIO_NORMAL
+// for standard interactive requests to exchange metadata
+//
+// PRIO_NORMAL | PRIO_SECONDARY
+// for standard interactive requests to exchange block data
+//
+// PRIO_BACKGROUND
+// for background resync requests to exchange metadata
+// PRIO_BACKGROUND | PRIO_SECONDARY
+// for background resync requests to exchange block data
+
/// Priority class: high
pub const PRIO_HIGH: RequestPriority = 0x20;
/// Priority class: normal
pub const PRIO_NORMAL: RequestPriority = 0x40;
/// Priority class: background
pub const PRIO_BACKGROUND: RequestPriority = 0x80;
+
/// Priority: primary among given class
pub const PRIO_PRIMARY: RequestPriority = 0x00;
/// Priority: secondary among given class (ex: `PRIO_HIGH | PRIO_SECONDARY`)