Skip to content

Reimplement the feature of support setting data file size limit#1210

Merged
ahrtr merged 2 commits into
etcd-io:mainfrom
Elbehery:20260526_support_data_size_limit
May 26, 2026
Merged

Reimplement the feature of support setting data file size limit#1210
ahrtr merged 2 commits into
etcd-io:mainfrom
Elbehery:20260526_support_data_size_limit

Conversation

@Elbehery

Copy link
Copy Markdown
Member

Fixes #1108

Continuation of #1130

Supersedes #1205

cc @ahrtr @ivanvc @fuweid @serathius

- Update fillDBWithKeys to accept a configurable value size
- Fix TestDB_MaxSizeNotExceeded to use larger values that trigger grow
- Remove Windows skip from TestDB_MaxSizeExceededCanOpenWithHighMmap
- Rewrite TestDB_MaxSizeExceededDoesNotGrow with table-driven sub-tests
  covering InitialMmapSize variants on Windows
- Add TestDB_MaxSizeWithHighInitialMMapDoesNotGrowOnWrite for non-Windows

Signed-off-by: elbehery <elbeherymustafa@gmail.com>
@serathius

Copy link
Copy Markdown
Member

/ok-to-test

@Elbehery

Copy link
Copy Markdown
Member Author

Yeah GH Actions is hallucinating

Current runner version: '2.334.0'
Runner Image Provisioner
Operating System
Runner Image
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3' (SHA:3a2844b7e9c422d3c10d287c895573f7108da1b3)
Error: An action could not be found at the URI 'https://codeload.github.com/actions/github-script/tar.gz/3a2844b7e9c422d3c10d287c895573f7108da1b3' (3818:24761A:1C3623:243168:6A158F6D)
Error: Failed to download archive 'https://codeload.github.com/actions/github-script/tar.gz/3a2844b7e9c422d3c10d287c895573f7108da1b3' after 1 attempts.

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
@Elbehery
Elbehery force-pushed the 20260526_support_data_size_limit branch from 9e9dae1 to a85b887 Compare May 26, 2026 12:58
@Elbehery

Copy link
Copy Markdown
Member Author

It is running now 👍🏽

@ahrtr ahrtr changed the title fix: Prevent speculative file growth and mmap state on MaxSize exceeded on Windows env. Reimplement the feature of support setting data file size limit May 26, 2026
@ahrtr

ahrtr commented May 26, 2026

Copy link
Copy Markdown
Member

This PR is on top of #1130 and #1206.

@ahrtr ahrtr 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.

LGTM

thx @Elbehery

cc @fuweid

Comment thread db_test.go
@k8s-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, Elbehery, fuweid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr
ahrtr merged commit 0a8fbd9 into etcd-io:main May 26, 2026
46 checks passed
@serathius

Copy link
Copy Markdown
Member

🎊

@Elbehery
Elbehery deleted the 20260526_support_data_size_limit branch May 27, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

When a db write fails because MaxSize is reached, the db client should still accept future reads and writes

5 participants