Add new bridges when first populated
This commit is contained in:
parent
b1d8ce7d8f
commit
9ac2df642a
|
@ -173,14 +173,15 @@ impl LoxServerContext {
|
||||||
match self.replace_with_new(bridgeline) {
|
match self.replace_with_new(bridgeline) {
|
||||||
lox_library::ReplaceSuccess::Replaced => {
|
lox_library::ReplaceSuccess::Replaced => {
|
||||||
println!("BridgeLine {:?} not found in rdsys update was successfully replaced.", bridgeline.uid_fingerprint);
|
println!("BridgeLine {:?} not found in rdsys update was successfully replaced.", bridgeline.uid_fingerprint);
|
||||||
self.metrics.removed_bridges.inc();}
|
self.metrics.removed_bridges.inc();
|
||||||
|
}
|
||||||
lox_library::ReplaceSuccess::NotReplaced => {
|
lox_library::ReplaceSuccess::NotReplaced => {
|
||||||
// Add the bridge to the list of to_be_replaced bridges in the Lox context and try
|
// Add the bridge to the list of to_be_replaced bridges in the Lox context and try
|
||||||
// again to replace at the next update (nothing changes in the Lox Authority)
|
// again to replace at the next update (nothing changes in the Lox Authority)
|
||||||
println!("BridgeLine {:?} not found in rdsys update NOT replaced, saved for next update!",
|
println!("BridgeLine {:?} not found in rdsys update NOT replaced, saved for next update!",
|
||||||
bridgeline.uid_fingerprint);
|
bridgeline.uid_fingerprint);
|
||||||
self.new_to_be_replaced_bridge(bridgeline);
|
self.new_to_be_replaced_bridge(bridgeline);
|
||||||
self.metrics.existing_or_updated_bridges.inc();
|
self.metrics.existing_or_updated_bridges.inc();
|
||||||
}
|
}
|
||||||
lox_library::ReplaceSuccess::NotFound => println!(
|
lox_library::ReplaceSuccess::NotFound => println!(
|
||||||
"BridgeLine {:?} no longer in reachable bridges.",
|
"BridgeLine {:?} no longer in reachable bridges.",
|
||||||
|
|
|
@ -204,6 +204,7 @@ async fn context_manager(
|
||||||
if context.bridgetable_is_empty() {
|
if context.bridgetable_is_empty() {
|
||||||
if let Some(working_resources) = resources.working {
|
if let Some(working_resources) = resources.working {
|
||||||
let bridgelines = parse_into_bridgelines(working_resources);
|
let bridgelines = parse_into_bridgelines(working_resources);
|
||||||
|
context.metrics.new_bridges.inc_by(bridgelines.len() as u64);
|
||||||
let (buckets, leftovers) = parse_into_buckets(bridgelines);
|
let (buckets, leftovers) = parse_into_buckets(bridgelines);
|
||||||
for leftover in leftovers {
|
for leftover in leftovers {
|
||||||
context.append_extra_bridges(leftover);
|
context.append_extra_bridges(leftover);
|
||||||
|
|
Loading…
Reference in New Issue