-
Notifications
You must be signed in to change notification settings - Fork 0
Thread safety/sync pool solution #17
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
47e7280
feat: add comprehensive test suite and thread safety analysis
shaia 1d6a14b
feat: implement thread-safe bloom filter with lock-free atomic operat…
shaia 4b27e48
fix: address critical pool storage bug and optimize thread-safe opera…
shaia 720ead9
fix: critical defer-in-loop bug causing pool exhaustion
shaia 098c089
docs: remove outdated THREAD_SAFETY_ANALYSIS.md
shaia 2c50d46
perf: optimize batch operations to reuse pooled storage across items
shaia a0bd1a2
fix: eliminate nested pool operations in batch functions causing race…
shaia 9d7e441
ci: simplify workflow by removing redundant race detector job
shaia 778bed6
refactor: improve code quality with modern Go patterns and accurate d…
shaia 22acf51
fix: apply nested pool operation fix to AddBatch function
shaia af8f8a3
perf: reduce test workload under race detector to prevent timeouts
shaia 4bfe710
fix: scale down test pre-population for race detector and update docs
shaia 55a6bb9
docs: update example to showcase thread-safety and batch operations
shaia bf345d0
refactor: add defensive copying of pooled storage slices in AddBatch …
shaia 71568fc
fix: reduce race detector test workload and fix verification logic
shaia 9d5b11d
fix: enable cross-platform testing in GitHub Actions workflow
shaia 13b9aeb
refactor: optimize CI workflow to reduce redundancy
shaia 65f529e
fix: prevent duplicate workflow runs on PR branches
shaia 75e8edc
fix: update bloomfilter and tests
shaia 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 |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run Tests | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| go-version: ['1.23.x'] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
| cache: true | ||
|
|
||
| - name: Verify dependencies | ||
| run: go mod verify | ||
|
|
||
| - name: Run go vet | ||
| run: go vet ./... | ||
|
|
||
| - name: Run tests | ||
| run: go test -v ./... | ||
|
|
||
| - name: Run tests with race detector | ||
| run: go test -race -short -timeout=10m -v ./... | ||
| env: | ||
| GORACE: "halt_on_error=1 log_path=race" | ||
|
|
||
| - name: Upload race detector logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: race-logs | ||
| path: race.* | ||
| retention-days: 7 | ||
|
|
||
| - name: Run benchmark tests (dry run) | ||
| run: go test -bench=. -benchtime=100ms -run=^$ ./tests/benchmark/... | ||
|
|
||
| build: | ||
| name: Build | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| go-version: ['1.23.x'] | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
| cache: true | ||
|
|
||
| - name: Build | ||
| run: go build -v ./... | ||
|
|
||
| - name: Test build with race detector enabled | ||
| run: go build -race -v ./... | ||
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.
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.
The
osmatrix variable is defined but the job is hardcoded to run onubuntu-latest(line 80:runs-on: ubuntu-latest). Change line 80 toruns-on: ${{ matrix.os }}to actually test on all three platforms.