diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-27 16:00:46 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-27 16:22:40 +0100 |
commit | 85f580cbde4913fe8382316ff3c27b8443c61dd7 (patch) | |
tree | b5bf432281b746706c38fd4e494240997b66e9d1 /src/net/message.rs | |
parent | 0d3e285d133459fd53e28f879a86c0de1a0c36df (diff) | |
download | garage-85f580cbde4913fe8382316ff3c27b8443c61dd7.tar.gz garage-85f580cbde4913fe8382316ff3c27b8443c61dd7.zip |
[fix-buffering] change request sending strategy and fix prioritiesfix-buffering
remove LAS, priorize new requests but otherwise just do standard queuing
Diffstat (limited to 'src/net/message.rs')
-rw-r--r-- | src/net/message.rs | 18 |
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`) |