Skip to content

Commit 373f6cf

Browse files
committed
fix: remove pending actors metric, fix actor error tracker, engine runner error print
1 parent e11706d commit 373f6cf

File tree

11 files changed

+17
-38
lines changed

11 files changed

+17
-38
lines changed

engine/docker/dev-host/grafana/dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/docker/dev-multidc-multinode/core/grafana/dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/docker/dev-multidc/core/grafana/dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/docker/dev-multinode/grafana/dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/docker/dev/grafana/dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/docker/template/grafana-dashboards/guard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@
13241324
},
13251325
"timepicker": {},
13261326
"timezone": "browser",
1327-
"title": "Rivet Guard",
1327+
"title": "Guard",
13281328
"uid": "cen785ige8fswd",
13291329
"version": 3
13301330
}

engine/packages/pegboard-runner/src/conn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ impl Init {
254254
}
255255
}
256256

257+
#[tracing::instrument(skip_all)]
257258
pub async fn handle_init(
258259
ctx: &StandaloneCtx,
259260
conn: &Conn,

engine/packages/pegboard/src/workflows/actor/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,11 +1058,11 @@ async fn handle_stopped(
10581058

10591059
// Set Crashed failure reason for actual crashes.
10601060
// Runner failure reasons are already set at the start of handle_stopped.
1061-
if let StoppedVariant::Normal { code, message } = &variant {
1062-
ensure!(
1063-
*code != protocol::mk2::StopCode::Ok,
1064-
"expected non-Ok stop code in crash handler, got Ok"
1065-
);
1061+
if let StoppedVariant::Normal {
1062+
code: protocol::mk2::StopCode::Error,
1063+
message,
1064+
} = &variant
1065+
{
10661066
ctx.v(3)
10671067
.activity(runtime::SetFailureReasonInput {
10681068
failure_reason: FailureReason::Crashed {

engine/packages/pegboard/src/workflows/runner.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ pub(crate) async fn allocate_pending_actors(
971971
let runner_eligible_threshold = ctx.config().pegboard().runner_eligible_threshold();
972972

973973
// NOTE: This txn should closely resemble the one found in the allocate_actor activity of the actor wf
974-
let (allocations, pending_actor_count) = ctx
974+
let allocations = ctx
975975
.udb()?
976976
.run(|tx| async move {
977977
let start = Instant::now();
@@ -993,7 +993,6 @@ pub(crate) async fn allocate_pending_actors(
993993
// the one we choose
994994
Snapshot,
995995
);
996-
let mut pending_actor_count = 0;
997996
let ping_threshold_ts = util::timestamp::now() - runner_eligible_threshold;
998997

999998
'queue_loop: loop {
@@ -1006,8 +1005,6 @@ pub(crate) async fn allocate_pending_actors(
10061005
break;
10071006
};
10081007

1009-
pending_actor_count += 1;
1010-
10111008
let (queue_key, generation) =
10121009
tx.read_entry::<keys::ns::PendingActorByRunnerNameSelectorKey>(&queue_entry)?;
10131010

@@ -1123,20 +1120,15 @@ pub(crate) async fn allocate_pending_actors(
11231120
},
11241121
});
11251122

1126-
pending_actor_count -= 1;
11271123
continue 'queue_loop;
11281124
}
11291125
}
11301126

1131-
Ok((allocations, pending_actor_count))
1127+
Ok(allocations)
11321128
})
11331129
.custom_instrument(tracing::info_span!("runner_allocate_pending_actors_tx"))
11341130
.await?;
11351131

1136-
metrics::ACTOR_PENDING_ALLOCATION
1137-
.with_label_values(&[&input.namespace_id.to_string(), &input.name.to_string()])
1138-
.set(pending_actor_count as i64);
1139-
11401132
Ok(AllocatePendingActorsOutput { allocations })
11411133
}
11421134

engine/packages/pegboard/src/workflows/runner2.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ pub(crate) async fn allocate_pending_actors(
649649
let runner_eligible_threshold = ctx.config().pegboard().runner_eligible_threshold();
650650

651651
// NOTE: This txn should closely resemble the one found in the allocate_actor activity of the actor wf
652-
let (allocations, pending_actor_count) = ctx
652+
let allocations = ctx
653653
.udb()?
654654
.run(|tx| async move {
655655
let start = Instant::now();
@@ -671,7 +671,6 @@ pub(crate) async fn allocate_pending_actors(
671671
// the one we choose
672672
Snapshot,
673673
);
674-
let mut pending_actor_count = 0;
675674
let ping_threshold_ts = util::timestamp::now() - runner_eligible_threshold;
676675

677676
'queue_loop: loop {
@@ -684,8 +683,6 @@ pub(crate) async fn allocate_pending_actors(
684683
break;
685684
};
686685

687-
pending_actor_count += 1;
688-
689686
let (queue_key, generation) =
690687
tx.read_entry::<keys::ns::PendingActorByRunnerNameSelectorKey>(&queue_entry)?;
691688

@@ -801,20 +798,15 @@ pub(crate) async fn allocate_pending_actors(
801798
},
802799
});
803800

804-
pending_actor_count -= 1;
805801
continue 'queue_loop;
806802
}
807803
}
808804

809-
Ok((allocations, pending_actor_count))
805+
Ok(allocations)
810806
})
811807
.custom_instrument(tracing::info_span!("runner_allocate_pending_actors_tx"))
812808
.await?;
813809

814-
metrics::ACTOR_PENDING_ALLOCATION
815-
.with_label_values(&[&input.namespace_id.to_string(), &input.name.to_string()])
816-
.set(pending_actor_count as i64);
817-
818810
Ok(AllocatePendingActorsOutput { allocations })
819811
}
820812

@@ -856,12 +848,6 @@ async fn drain_older_versions(
856848
ctx: &ActivityCtx,
857849
input: &DrainOlderVersionsInput,
858850
) -> Result<crate::ops::runner::drain::Output> {
859-
tracing::info!(
860-
namespace_id = %input.namespace_id,
861-
name = %input.name,
862-
version = input.version,
863-
"drain_older_versions activity called"
864-
);
865851
ctx.op(crate::ops::runner::drain::Input {
866852
namespace_id: input.namespace_id,
867853
name: input.name.clone(),

0 commit comments

Comments
 (0)