Skip to content
Snippets Groups Projects
Commit 2c025c98 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

refactor: use HashMap by default, use BTreeMap for order/determinism

parent 0755c236
No related branches found
No related tags found
1 merge request!166feature: implement failure domains
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::collections::{BTreeMap, HashMap, HashSet};
use crate::traft::instance_uuid;
use crate::traft::replicaset_uuid;
......@@ -14,8 +13,8 @@ pub struct Topology {
replication_factor: u8,
max_raft_id: RaftId,
instance_map: BTreeMap<InstanceId, Peer>,
replicaset_map: BTreeMap<ReplicasetId, BTreeSet<InstanceId>>,
instance_map: HashMap<InstanceId, Peer>,
replicaset_map: BTreeMap<ReplicasetId, HashSet<InstanceId>>,
}
impl Topology {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment