Skip to content

Commit 9d40cc9

Browse files
committed
logging: Improve logging around response extension
1 parent fc12205 commit 9d40cc9

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

crates/wasm-workers/src/workflow/event_history.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,20 +370,28 @@ impl EventHistory {
370370
while let Some(timeout_fut) =
371371
self.deadline_tracker.track(self.subscription_interruption)
372372
{
373+
let start_idx = u32::try_from(self.responses.len()).map_err(|_| {
374+
ApplyError::ConstraintViolation(
375+
"number of responses must not exceed u32::MAX".into(),
376+
)
377+
})?;
373378
match db_connection
374379
.subscribe_to_next_responses(
375380
&db_connection.execution_id,
376-
u32::try_from(self.responses.len()).map_err(|_| {
377-
ApplyError::ConstraintViolation(
378-
"number of responses must not exceed u32::MAX".into(),
379-
)
380-
})?,
381+
start_idx,
381382
timeout_fut,
382383
)
383384
.await
384385
{
385386
Ok(next_responses) => {
386-
debug!("Got next responses {next_responses:?}");
387+
debug!(
388+
"Original {orig_len} responses are extended by {len} with start_idx {start_idx} first: {first:?}, last: {last:?}",
389+
orig_len = self.responses.len(),
390+
len = next_responses.len(),
391+
first = next_responses.first(),
392+
last = next_responses.last(),
393+
);
394+
trace!("Got next responses {next_responses:?}");
387395
self.responses.extend(
388396
next_responses
389397
.into_iter()
@@ -1902,7 +1910,7 @@ impl SubmitChildExecution {
19021910
called_at,
19031911
)
19041912
.await?;
1905-
// TODO: return void
1913+
// TODO: return void, execution id is already known at this point
19061914
let value =
19071915
assert_matches!(value, ChildReturnValue::WastVal(wast_val) => wast_val.as_val());
19081916

@@ -2099,7 +2107,7 @@ impl JoinNextRequestingFfqn {
20992107
})?
21002108
.shift_remove(actual_id);
21012109
assert!(was_present.is_some());
2102-
}
2110+
} // all-processed does not change `index_join_set_to_unawaited_requests`
21032111
await_ext_err.as_wast_val_result()
21042112
}
21052113
}

0 commit comments

Comments
 (0)