JonathanR
JonathanR
Explore posts from servers
CDCloudflare Developers
Created by JonathanR on 3/19/2024 in #workers-help
Extremely curious transaction/timeout errors starting on 3/17
During our investigation we tried many fixes, but the one that worked was this change:
// FAILS -> DurableObjectTimeout
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk);
}

// Also FAILS -> Transaction failed due to conflict
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk, { allowUnconfirmed: true });
}
await this.dos.sync();

// WORKS, no errors.
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk, { allowUnconfirmed: true });
await this.dos.sync();
}
// FAILS -> DurableObjectTimeout
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk);
}

// Also FAILS -> Transaction failed due to conflict
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk, { allowUnconfirmed: true });
}
await this.dos.sync();

// WORKS, no errors.
for (const chunk of chunked(allKeysToDelete, 128)) {
await this.dos.delete(chunk, { allowUnconfirmed: true });
await this.dos.sync();
}
2 replies