Skip to content

Update buffer/stage/commit strategy during writes#168

Merged
lnkuiper merged 2 commits into
duckdb:v1.5-variegatafrom
benfleis:adjust-buffer-stage-commit-strategy
May 28, 2026
Merged

Update buffer/stage/commit strategy during writes#168
lnkuiper merged 2 commits into
duckdb:v1.5-variegatafrom
benfleis:adjust-buffer-stage-commit-strategy

Conversation

@benfleis

@benfleis benfleis commented May 11, 2026

Copy link
Copy Markdown
Member

Update buffer/stage/commit strategy during writes

Previous update (commit every 10k stage calls) address 1 Azure
limitation, but missed a second limitation. This fixes the full issue
of file size limitations mentioned in duckdb/duckdb-delta#299.

On top of earlier change to force Commit/Sync before hitting Azure blob
limit of 100k staged blocks, go a step further and introduce proper
write buffering with fixed-size blocks.

  • introduces a local fixed size write buffer (same as S3 already does)
  • by default allows files up to (50k * 8MB) ~= 390 GiB
  • add buffer size option, allowing Azure's max 4000MiB buffers and
    190TiB files

Addresses (fully) duckdb/duckdb-delta#299

@benfleis
benfleis force-pushed the adjust-buffer-stage-commit-strategy branch from eec6835 to 512d6f2 Compare May 12, 2026 05:47
@benfleis
benfleis requested a review from carlopi May 12, 2026 05:49
@benfleis
benfleis marked this pull request as draft May 12, 2026 09:24
@benfleis
benfleis force-pushed the adjust-buffer-stage-commit-strategy branch 4 times, most recently from 7dec63d to 79654cc Compare May 13, 2026 10:36
@benfleis
benfleis force-pushed the adjust-buffer-stage-commit-strategy branch 2 times, most recently from 12a1c66 to a4a1b71 Compare May 20, 2026 12:56
Previous update (commit every 10k stage calls) address 1 Azure
limitation, but missed a second limitation. This fixes the full issue
of file size limitations mentioned in duckdb/duckdb-delta#299.

On top of earlier change to force Commit/Sync before hitting Azure blob
limit of 100k staged blocks, go a step further and introduce proper
write buffering with fixed-size blocks.

- introduces a local fixed size write buffer (same as S3 already does)
- by default allows files up to (50k * 8MB) ~= 390 GiB
- add buffer size option, allowing Azure's max 4000MiB buffers and
  190TiB files
@benfleis
benfleis force-pushed the adjust-buffer-stage-commit-strategy branch from a4a1b71 to af09f6f Compare May 20, 2026 14:59
@benfleis
benfleis marked this pull request as ready for review May 20, 2026 15:08
@benfleis
benfleis requested a review from lnkuiper May 28, 2026 09:20

@lnkuiper lnkuiper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I had Codex cross-reference this with the Azure docs and it thinks there is breakage:

Comment thread src/azure_dfs_filesystem.cpp
Comment thread README.md Outdated
@lnkuiper
lnkuiper merged commit 143b3af into duckdb:v1.5-variegata May 28, 2026
18 checks passed
@djouallah

Copy link
Copy Markdown
Contributor

@benfleis sorry for being a pain, how can i test this ?

@benfleis

Copy link
Copy Markdown
Member Author

@djouallah no worries, it was on my list to test today, but I see now that I need to switch a build config to get nightly back to working in 1.5.3. I'll push that PR and ping you here once it's available!

benfleis added a commit that referenced this pull request Jul 13, 2026
**Forward fill v1.5 variegata PRs -> main**
Forward-ports:

- #169 — force blob (write) sync every 10k appends (Azure 100k staged
  block limit)
- #168 — buffer/stage/commit rewrite: fixed-size local write buffer
  (mirrors S3), configurable buffer size, fixes DFS sync-offset
- #173 — actionlint CI fixes (ccache key, setup-python@v5)

Not forward-ported (branch-specific to v1.5-variegata, don't apply to
main): #166 (duckdb pin bump to variegata tag), #167 (CI refs
pinned to v1.5-variegata / v1.5.3). #162 already on main via
separate cherry-picks.

**CI/Build**
- Needed action version updates + Actionlint fixes
- Windows build/image vcvars fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants