Skip to content

Conversation

dragonfly1033
Copy link
Contributor

Adding events to the index is now idempotent.

  • Public API changes documented in changelogs (optional)

Signed-off-by: Shrey Patel [email protected]

@dragonfly1033 dragonfly1033 requested a review from a team as a code owner August 21, 2025 14:51
@dragonfly1033 dragonfly1033 requested review from bnjbvr and removed request for a team August 21, 2025 14:51
@dragonfly1033 dragonfly1033 force-pushed the dragonfly1033/fix_indexing branch from c8b58c5 to 5ea9850 Compare August 21, 2025 15:02
Copy link

codspeed-hq bot commented Aug 21, 2025

CodSpeed Performance Report

Merging #5567 will not alter performance

Comparing dragonfly1033/fix_indexing (59be73d) with main (8804966)

Summary

✅ 37 untouched benchmarks

@dragonfly1033 dragonfly1033 force-pushed the dragonfly1033/fix_indexing branch 2 times, most recently from 0aa4376 to 010e2a7 Compare August 21, 2025 15:28
@dragonfly1033 dragonfly1033 reopened this Aug 22, 2025
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 72.88136% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.62%. Comparing base (b6433de) to head (59be73d).
⚠️ Report is 20 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-search/src/index.rs 72.88% 3 Missing and 13 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5567      +/-   ##
==========================================
- Coverage   88.63%   88.62%   -0.01%     
==========================================
  Files         341      341              
  Lines       95138    95196      +58     
  Branches    95138    95196      +58     
==========================================
+ Hits        84322    84371      +49     
+ Misses       6628     6625       -3     
- Partials     4188     4200      +12     

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

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Slightly worried that we have to run a specific search for what's conceptually a set lookup. Could you write a tiny benchmark and measure how long it takes to add the same document, say, 1000 / 10000 / 100000 times? (not necessarily one in the benches dir and that we'd check in, but you'd get bonus points for that!)

@dragonfly1033 dragonfly1033 force-pushed the dragonfly1033/fix_indexing branch from 010e2a7 to 59be73d Compare August 26, 2025 08:43
@dragonfly1033 dragonfly1033 requested a review from bnjbvr August 26, 2025 09:29
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Please look at my previous review comment where I asked for running a tiny benchmark.

@dragonfly1033
Copy link
Contributor Author

Sorry, got a bit eager. Here's the results, looks like nothing to worry about.
image

For reference: this is benching the RoomIndex::handle_event function on the same event.

@bnjbvr bnjbvr merged commit b2387bf into main Aug 26, 2025
52 checks passed
@bnjbvr bnjbvr deleted the dragonfly1033/fix_indexing branch August 26, 2025 11:25
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