Update lunny/levelqueue to prevent NPE when reads are performed after close#20534
Merged
6543 merged 1 commit intogo-gitea:mainfrom Jul 29, 2022
Merged
Update lunny/levelqueue to prevent NPE when reads are performed after close#205346543 merged 1 commit intogo-gitea:mainfrom
6543 merged 1 commit intogo-gitea:mainfrom
Conversation
… close go-gitea#20380 reveals that there was a slight bug in the levelqueue code that assumed that reads and write would not occur after the db is closed. This unfortunately cannot be assumed, and if a read or write occured this would result in a NPE. This bug has been fixed in f020868cc2f78a4bb0b110c4c232c74be048453e therefore this PR updates Gitea to use this. Fix go-gitea#20380 Signed-off-by: Andrew Thornton <art27@cantab.net>
Contributor
Author
|
I'm not sure that this could actually occur within Gitea itself - certainly it would be very a racy thing that could only occur rarely at shutdown. However, the bug occurs frequently enough in testing that it should be backported to v1.17. |
wxiaoguang
approved these changes
Jul 29, 2022
a1012112796
approved these changes
Jul 29, 2022
6543
approved these changes
Jul 29, 2022
Codecov Report
@@ Coverage Diff @@
## main #20534 +/- ##
=======================================
Coverage ? 46.93%
=======================================
Files ? 978
Lines ? 135461
Branches ? 0
=======================================
Hits ? 63572
Misses ? 64087
Partials ? 7802 Help us with your feedback. Take ten seconds to tell us how you rate us. |
6543
pushed a commit
to 6543-forks/gitea
that referenced
this pull request
Jul 29, 2022
Member
|
-> #20537 |
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Aug 1, 2022
* giteaofficial/main: (29 commits) [skip ci] Updated translations via Crowdin Support localized README (go-gitea#20508) Clean up and fix clone button script (go-gitea#20415) Add disable download source configuration (go-gitea#20548) Fix default merge style (go-gitea#20564) Update login methods in package docs (go-gitea#20561) Add missing Tabs on organisation/package view (Frontport go-gitea#20539) (go-gitea#20540) [skip ci] Updated licenses and gitignores Add setting `SQLITE_JOURNAL_MODE` to enable WAL (go-gitea#20535) Rework file highlight rendering and fix yaml copy-paste (go-gitea#19967) Add new API endpoints for push mirrors management (go-gitea#19841) WebAuthn CredentialID field needs to be increased in size (go-gitea#20530) Add latest commit's SHA to content response (go-gitea#20398) Improve token and secret key generation docs (go-gitea#20387) [skip ci] Updated translations via Crowdin Rework raw file http header logic (go-gitea#20484) Update lunny/levelqueue to prevent NPE when reads are performed after close (go-gitea#20534) Added guidance on file to choose to download (go-gitea#20474) [skip ci] Updated translations via Crowdin Ensure that all unmerged files are merged when conflict checking (go-gitea#20528) ...
vsysoev
pushed a commit
to IntegraSDL/gitea
that referenced
this pull request
Aug 10, 2022
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
#20380 reveals that there was a slight bug in the levelqueue code that assumed that
reads and write would not occur after the db is closed. This unfortunately cannot be
assumed, and if a read or write occured this would result in a NPE.
This bug has been fixed in f020868cc2f78a4bb0b110c4c232c74be048453e therefore this
PR updates Gitea to use this.
Fix #20380
Signed-off-by: Andrew Thornton art27@cantab.net