Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Fix panic if unable to assign a state key NID #3294

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Dec 30, 2023

Main change is the added error check before storing the eventStateKeyNID in the cache.

The panic happens if we attempt to set the cache for 0 multiple times, because the cache is immutable.

@S7evinK S7evinK added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label Dec 30, 2023
@S7evinK S7evinK requested a review from a team as a code owner December 30, 2023 14:52
Copy link

codecov bot commented Dec 30, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (9a5a567) 65.76% compared to head (61816c1) 65.71%.

Files Patch % Lines
roomserver/storage/shared/storage.go 40.00% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3294      +/-   ##
==========================================
- Coverage   65.76%   65.71%   -0.06%     
==========================================
  Files         509      509              
  Lines       57461    57464       +3     
==========================================
- Hits        37790    37763      -27     
- Misses      15842    15865      +23     
- Partials     3829     3836       +7     
Flag Coverage Δ
unittests 49.74% <40.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@S7evinK S7evinK merged commit edd02ec into main Dec 30, 2023
18 of 20 checks passed
@S7evinK S7evinK deleted the s7evink/fix-cache-panic branch December 30, 2023 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant