Skip to content
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

Problem: async commit queue size not configurable #1029

Merged
merged 3 commits into from
May 17, 2023

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented May 16, 2023

Solution:

  • change the bool option to int

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@yihuang yihuang requested a review from a team as a code owner May 16, 2023 12:54
@yihuang yihuang requested review from leejw51crypto, thomas-nguy and mmsqe and removed request for a team May 16, 2023 12:54
ZeroCopy: rs.zeroCopy,
CreateIfMissing: true,
InitialStores: initialStores,
TargetVersion: uint32(version),

Check failure

Code scanning / gosec

Potential integer overflow by integer type conversion

Potential integer overflow by integer type conversion
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #1029 (d80aaba) into main (7f20b83) will increase coverage by 0.18%.
The diff coverage is 47.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1029      +/-   ##
==========================================
+ Coverage   46.17%   46.35%   +0.18%     
==========================================
  Files          82       82              
  Lines        6937     6950      +13     
==========================================
+ Hits         3203     3222      +19     
+ Misses       3397     3393       -4     
+ Partials      337      335       -2     
Impacted Files Coverage Δ
app/config/config.go 100.00% <ø> (ø)
memiavl/db.go 58.09% <46.15%> (+3.79%) ⬆️
app/memiavl.go 100.00% <100.00%> (ø)

Comment on lines +275 to +289
go func() {
defer close(walQuit)

for entry := range walChan {
bz, err := entry.data.Marshal()
if err != nil {
walQuit <- err
return
}
if err := db.wal.Write(entry.index, bz); err != nil {
walQuit <- err
return
}
}
}()

Check notice

Code scanning / CodeQL

Spawning a Go routine

Spawning a Go routine may be a possible source of non-determinism
Solution:
- change the bool option to int

rename

WaitAsyncCommit
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.

2 participants