Skip to content

Conversation

@bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Feb 3, 2026

I've also shortened the comment in the read method, as talking about the previous implementations that didn't work in such detail doesn't help that much IMO. See the description commit by commit.

…EventCacheState`

There was nothing called `RoomEventCacheState` anymore, and the `Inner`
suffix is dubious, at best. Also, we can get rid of the `Lock`
component, since indeed it's locked, but it's a detail from the point of
view of the `RoomEventCacheState` itself. This makes for a shorter and
nicer name.
@bnjbvr bnjbvr requested a review from a team as a code owner February 3, 2026 17:05
@bnjbvr bnjbvr requested review from poljar and removed request for a team February 3, 2026 17:05
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.84%. Comparing base (40c6c33) to head (2034ea3).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6109   +/-   ##
=======================================
  Coverage   89.84%   89.84%           
=======================================
  Files         363      363           
  Lines      100638   100638           
  Branches   100638   100638           
=======================================
  Hits        90420    90420           
+ Misses       6690     6689    -1     
- Partials     3528     3529    +1     

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

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2026

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing bnjbvr/rename-complicated-struct-name (2034ea3) with main (50cc5f4)

Open in CodSpeed

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the renaming of RoomEventCacheStateLockInner to RoomEventCacheState.

I understand the motivation behind the simplification of the inner comments of the read operation, but I do not agree to remove the explanations. We've plenty of long inline comments in the code, for valid reasons. I consider this is a valid reason. I believe your additions is good, but the removals aren't.

Finally, I disagree with the renaming of the read lock acquisition.

Comment on lines 910 to 914
// Other attempts have been done in the past, including but not limited to
// using: an upgradeable read lock, a downgrading write lock, atomic
// read and write locks, and a semaphore with one permit. Each of
// these attempts had their own problems, so they've been ditched in
// favor of this solution.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this summary, but the details are important. Please restore the previous explanations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, reverted this commit.

@bnjbvr bnjbvr force-pushed the bnjbvr/rename-complicated-struct-name branch from bd64444 to 2034ea3 Compare February 4, 2026 09:15
@bnjbvr bnjbvr requested review from Hywan and removed request for poljar February 4, 2026 09:16
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.

3 participants