Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix for OOM issue with transitive paths #1622

Closed
wants to merge 2 commits into from

Conversation

hannahbast
Copy link
Member

@hannahbast hannahbast commented Nov 17, 2024

Fixes #1606 .

TODO: Currently only works when the start side of the transitive path operation has an empty local vocab (which is typically the case).

TODO: This only works when the start side of the transitive path
operation has an empty local vocab. What is the right way to fix this?
@RobinTF
Copy link
Collaborator

RobinTF commented Nov 17, 2024

@hannahbast

Maybe for the case of empty vocabs this patch works better:

diff --git a/src/engine/LocalVocab.h b/src/engine/LocalVocab.h
index 3055c400..8190b72d 100644
--- a/src/engine/LocalVocab.h
+++ b/src/engine/LocalVocab.h
@@ -97,6 +97,9 @@ class LocalVocab {
   void mergeWith(const R& vocabs) {
     auto inserter = std::back_inserter(otherWordSets_);
     for (const auto& vocab : vocabs) {
+      if (vocab.empty()) {
+        continue;
+      }
       std::ranges::copy(vocab.otherWordSets_, inserter);
       *inserter = vocab.primaryWordSet_;
     }

@hannahbast hannahbast requested a review from RobinTF November 17, 2024 19:50
@sparql-conformance
Copy link

Conformance check passed ✅

Test Status Changes 📊

Number of Tests Previous Status Current Status
6 Failed Passed

Details: https://qlever.cs.uni-freiburg.de/sparql-conformance-ui?cur=3dc846a513d5ec8ddbc7f4718ea561dd93242dd2&prev=39ca684ae4e97f315eb0f1f198654547764d7c10

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.29%. Comparing base (39ca684) to head (3dc846a).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/engine/TransitivePathImpl.h 25.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1622      +/-   ##
==========================================
- Coverage   89.30%   89.29%   -0.01%     
==========================================
  Files         373      373              
  Lines       35377    35383       +6     
  Branches     3999     4000       +1     
==========================================
+ Hits        31594    31597       +3     
- Misses       2493     2497       +4     
+ Partials     1290     1289       -1     

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


🚨 Try these New Features:

Copy link

@RobinTF
Copy link
Collaborator

RobinTF commented Nov 18, 2024

Closing for #1621

@RobinTF RobinTF closed this Nov 18, 2024
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.

query causing QLever to crash
2 participants