注册并分享邀请链接,可获得视频播放与邀请奖励。

Delali 的个人资料封面
Delali 的头像

Delali (@delali)

@delali
0 正在关注    0 粉丝
A developer received a Cloudflare bill for $4,868 on an account that he typically pays $5 per month. During January, two of his workers wrote 4.83 billion rows into D1. One worker repeatedly started from the same batch on every cron tick, writing the same embeddings multiple times. The other worker inserted rows already present in D1, as their statement contained no "ON CONFLICT" clause. Cloudflare charges $1 for every million D1 rows written beyond the 50 million included in the plan, causing the ongoing loop to continue adding to the bill until someone reviews the invoice. Make sure to give every insert an ON CONFLICT clause, and mark each batch once it has been written, so that your worker queries the mark before rewriting the same rows. This sounds simple, but your coding agent can easily miss it.
显示更多