summaryrefslogtreecommitdiff
path: root/ext/kv/lib.rs
diff options
context:
space:
mode:
authorIgor Zinkovsky <igor@deno.com>2023-12-12 22:51:23 -0800
committerGitHub <noreply@github.com>2023-12-12 22:51:23 -0800
commit86769b0d1cfb7341df31278913524492d5f9ab52 (patch)
treedba094702ec2c4ad19a59f61151a777fd3f3e0b9 /ext/kv/lib.rs
parent0ceae7a490d933144f63be5bc9d5ba0b27bf5c6e (diff)
feat(ext/kv) add backoffSchedule to enqueue (#21474)
Also reduces the time to run `kv_queue_undelivered_test.ts` test from 100 seconds down to 3 seconds. closes #21437
Diffstat (limited to 'ext/kv/lib.rs')
-rw-r--r--ext/kv/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs
index 456a1ebf7..943aae460 100644
--- a/ext/kv/lib.rs
+++ b/ext/kv/lib.rs
@@ -802,6 +802,9 @@ where
for enqueue in &enqueues {
total_payload_size += check_enqueue_payload_size(&enqueue.payload)?;
+ if let Some(schedule) = enqueue.backoff_schedule.as_ref() {
+ total_payload_size += 4 * schedule.len();
+ }
}
if total_payload_size > MAX_TOTAL_MUTATION_SIZE_BYTES {