-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update lunny/levelqueue to prevent NPE when reads are performed after close #20534
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>
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. |
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. |
-> #20537 |
* 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) ...
#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