cloudflare / cloudflare/workers-sdk
D1 remote vs local execute divergence
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
### What versions & operating system are you using?
System:
OS: Windows 11 10.0.26200
CPU: (24) x64 AMD Ryzen AI 9 HX 370 w/ Radeon 890M
Memory: 5.46 GB / 31.12 GB
Binaries:
Node: 24.9.0 - C:\nvm4w\nodejs\node.EXE
Yarn: 1.22.22 - C:\nvm4w\nodejs\yarn.CMD
npm: 11.6.0 - C:\nvm4w\nodejs\npm.CMD
bun: 1.3.1 - C:\Users\my_user_dir\.bun\bin\bun.EXE
npmPackages:
@cloudflare/puppeteer: ^1.0.4 => 1.0.4
wrangler: ^4.55.0 => 4.55.0
### Please provide a link to a minimal reproduction
https://github.com/mrxbox98/cf-debug
### Describe the Bug
Using the `db.sql` file in the repo, executing it remotely using `npx wrangler d1 execute db-name --remote --file=db.sql` works fine, but executing it locally using `npx wrangler d1 execute db-name --file=db.sql` yields the error
```
kj/table.c++:57: error: HashIndex detected hash table inconsistency. This can happen if you create a kj::Table with a hash index and you modify the rows in the table post-indexing in a way that would change their hash. This is a serious bug which will lead to undefined behavior.
stack: ; kj::getStackTrace() = 7ff6490d0fb7 7ff649ab56f1 7ff649aafb57 7ff649ab3e1e 7ff6491c488b 7ff648ddd9e0 7ff648ddd70f 7ff648ddd4c3 7ff64aa403b9 7ff6aaa87b74 3df00000010 3df00cda16c 9 3df00020000 3df0c09b9a8
✘ [ERROR] Body Timeout Error
```
There are a lot more of the HashIndex errors but I only included the ending chunk.
### Please provide any relevant error logs
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.