Apply PRIO_SECONDARY to block data transfers

This commit is contained in:
Alex Auvolat 2022-09-01 16:35:43 +02:00
parent e648bf7b69
commit 99b532b85b
No known key found for this signature in database
GPG key ID: 0E496D15096376BE
2 changed files with 4 additions and 4 deletions

View file

@ -198,7 +198,7 @@ impl BlockManager {
let rpc = self.endpoint.call_streaming( let rpc = self.endpoint.call_streaming(
&node_id, &node_id,
BlockRpc::GetBlock(*hash, order_tag), BlockRpc::GetBlock(*hash, order_tag),
PRIO_NORMAL, PRIO_NORMAL | PRIO_SECONDARY,
); );
tokio::select! { tokio::select! {
res = rpc => { res = rpc => {
@ -245,7 +245,7 @@ impl BlockManager {
let rpc = self.endpoint.call_streaming( let rpc = self.endpoint.call_streaming(
&node_id, &node_id,
BlockRpc::GetBlock(*hash, order_tag), BlockRpc::GetBlock(*hash, order_tag),
PRIO_NORMAL, PRIO_NORMAL | PRIO_SECONDARY,
); );
tokio::select! { tokio::select! {
res = rpc => { res = rpc => {
@ -336,7 +336,7 @@ impl BlockManager {
&self.endpoint, &self.endpoint,
&who[..], &who[..],
put_block_rpc, put_block_rpc,
RequestStrategy::with_priority(PRIO_NORMAL) RequestStrategy::with_priority(PRIO_NORMAL | PRIO_SECONDARY)
.with_quorum(self.replication.write_quorum()) .with_quorum(self.replication.write_quorum())
.with_timeout(BLOCK_RW_TIMEOUT), .with_timeout(BLOCK_RW_TIMEOUT),
) )

View file

@ -18,7 +18,7 @@ use opentelemetry::{
pub use netapp::endpoint::{Endpoint, EndpointHandler, StreamingEndpointHandler}; pub use netapp::endpoint::{Endpoint, EndpointHandler, StreamingEndpointHandler};
use netapp::message::IntoReq; use netapp::message::IntoReq;
pub use netapp::message::{ pub use netapp::message::{
Message as Rpc, OrderTag, Req, RequestPriority, Resp, PRIO_BACKGROUND, PRIO_HIGH, PRIO_NORMAL, Message as Rpc, OrderTag, Req, RequestPriority, Resp, PRIO_BACKGROUND, PRIO_HIGH, PRIO_NORMAL, PRIO_SECONDARY
}; };
use netapp::peering::fullmesh::FullMeshPeeringStrategy; use netapp::peering::fullmesh::FullMeshPeeringStrategy;
pub use netapp::{self, NetApp, NodeID}; pub use netapp::{self, NetApp, NodeID};