-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: write-buffer-size overflow #3193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Z-G-H1
wants to merge
11
commits into
OpenAtomFoundation:unstable
Choose a base branch
from
Z-G-H1:fix-for-unstable
base: unstable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+53
−52
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3cb91ee
修复v3.5.5版本中write-buffer-size溢出问题
a587e93
add test for fix #3183
Z-G-H1 9402fc9
add test case
Z-G-H1 0c82d04
Merge branch 'OpenAtomFoundation:unstable' into fix-for-unstable
Z-G-H1 2352b94
modify ci
Z-G-H1 93150ed
Upgrade macOS version in GitHub Actions workflow
Z-G-H1 e9be2da
Upgrade GCC version in CI workflow
Z-G-H1 a79a94a
fix hashes_test
Z-G-H1 933d31e
fix test
Z-G-H1 bf44a12
fix hashes_test
Z-G-H1 658b9d5
fix test
Z-G-H1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,24 +170,12 @@ jobs: | |
|
|
||
| - name: Extreme Disk Cleanup | ||
| run: | | ||
|
|
||
| rm -rf /usr/local/share/* || true | ||
| rm -rf /usr/share/doc/* || true | ||
| rm -rf /usr/share/man/* || true | ||
| rm -rf /var/cache/* || true | ||
|
|
||
| find ${{ github.workspace }} -name "*.o" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.a" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.la" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.so" -type f -delete || true | ||
| find ${{ github.workspace }} -name "*.pyc" -type f -delete || true | ||
|
|
||
| rm -rf ${{ github.workspace }}/.git || true | ||
|
|
||
| rm -rf /__w/pikiwidb/pikiwidb/buildtrees 2>/dev/null || true | ||
| rm -rf /__w/pikiwidb/pikiwidb/deps 2>/dev/null || true | ||
| find /__w/pikiwidb/pikiwidb -type f \( -name "librocksdb.a" -o -name "libprotoc.a" -o -name "libprotobuf.a" \) -delete 2>/dev/null || true | ||
| find /__w/pikiwidb/pikiwidb -type f \( -name "*.o" -o -name "*.a" -o -name "*.la" -o -name "*.so" -o -name "*_test" \) ! -path "*/build/pika" -delete 2>/dev/null || true | ||
| rm -rf /__w/pikiwidb/pikiwidb/.git 2>/dev/null || true | ||
| df -h | ||
|
|
||
| echo "Largest directories:" | ||
| du -h --max-depth=2 / 2>/dev/null | sort -hr | head -20 | ||
|
|
||
| - name: Create Log Directories | ||
| run: | | ||
|
|
@@ -225,7 +213,7 @@ jobs: | |
|
|
||
| build_on_macos: | ||
|
|
||
| runs-on: macos-13 | ||
| runs-on: macos-14 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -238,17 +226,18 @@ jobs: | |
| - name: ccache | ||
| uses: hendrikmuhs/[email protected] | ||
| with: | ||
| key: macos-13 | ||
| key: macos-14 | ||
|
|
||
| - name: Install Deps | ||
| run: | | ||
| brew list --versions cmake && brew uninstall --ignore-dependencies --force cmake || true | ||
| brew install gcc@10 automake cmake make binutils | ||
| brew install gcc@13 automake cmake make binutils | ||
|
|
||
| - name: Configure CMake | ||
| run: | | ||
| export CC=/usr/local/opt/gcc@10/bin/gcc-10 | ||
| cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| GCC_PREFIX=$(brew --prefix gcc@13) | ||
| export CC=$GCC_PREFIX/bin/gcc-13 | ||
| cmake -B build -DCMAKE_C_COMPILER=$GCC_PREFIX/bin/gcc-13 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
|
|
||
| - name: Build | ||
| run: | | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: OpenAtomFoundation/pikiwidb
Length of output: 198
🏁 Script executed:
Repository: OpenAtomFoundation/pikiwidb
Length of output: 198
🌐 Web query:
find -path glob pattern matching behavior exclude directory💡 Result:
Short summary
Typical examples
Exclude a directory named dir_to_exclude under the current dir:
find . -path "./dir_to_exclude" -prune -o -print
(prints everything except dir_to_exclude and its contents). [2]
Exclude by pattern (all files under any dir named node_modules):
find . -path "/node_modules/" -prune -o -name "*.js" -print
(prunes those trees, then finds .js elsewhere). [2][3]
Notes and pitfalls
Sources: man page for find ( -path / -prune ) and common examples/discussion. [1][2][3]
References
[1] find man page (–path description).
[2] Stack Overflow — "How do I exclude a directory when using find?" (examples using -prune).
[3] Stack Overflow — examples and explanation of -path matching and -prune.
Fix find pattern to correctly preserve build/pika artifacts.
The pattern
! -path "*/build/pika"will not exclude files under the build/pika directory. A file likebuild/pika/lib.ahas the full pathbuild/pika/lib.a, which does not match the glob pattern*/build/pika(the pattern only matches the directory name itself, not paths within it). Use! -path "*/build/pika/*"instead. Better yet, use-prunefor both correctness and efficiency:find ... -path "*/build/pika" -prune -o \( -name "*.o" -o -name "*.a" ... \) -delete.🤖 Prompt for AI Agents