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

SPARQL Update Part 2: DeltaTriples #1429

Merged
merged 13 commits into from
Oct 4, 2024

Conversation

Qup42
Copy link
Member

@Qup42 Qup42 commented Jul 31, 2024

DeltaTriples manage on LocatedTriples object per permutation. Insertions/Deletions of (sets of) triples are processed by DeltaTriples.

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 98.57143% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.21%. Comparing base (d5315d2) to head (826f17c).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
src/index/DeltaTriples.h 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1429      +/-   ##
==========================================
- Coverage   94.14%   88.21%   -5.94%     
==========================================
  Files         347      361      +14     
  Lines       25641    27132    +1491     
  Branches     3450     3661     +211     
==========================================
- Hits        24141    23935     -206     
- Misses       1458     1952     +494     
- Partials       42     1245    +1203     

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

Copy link

sonarcloud bot commented Jul 31, 2024

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

A first round of reviews.

src/index/Permutation.h Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
explicit DeltaTriples(const Index& index) : index_(index) {}

// Get the common `LocalVocab` of the delta triples.
LocalVocab& localVocab() { return localVocab_; }
Copy link
Member

Choose a reason for hiding this comment

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

Is it a good idea to make this mutable getter public?
It lets us introduce very very very nasty bugs.

Copy link
Member Author

@Qup42 Qup42 Aug 4, 2024

Choose a reason for hiding this comment

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

Made it private for now.
Mutable LocalVocabs are used in LocatedTriples and the execution of normal queries (though these are currently temporary). These two need to be in sync for the retrieval of IDs while querying. The temporary IDs that a generated while querying (e.g. Service) can be discarded. Given the constraints I decided on a single global LocalVocab. This is a point that is still open for the integration PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yes,
I think that issues like "how do we clean up the local vocab, when the inserted entries are not needed anymore"
Can be postponed to the future, as it is probably related with the question "how do we deal with concurrent updates" (in particular updates that run concurrently with queries.).

src/index/DeltaTriples.cpp Outdated Show resolved Hide resolved
src/index/DeltaTriples.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Show resolved Hide resolved
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Thank you very much, this is very clean code.
I just have some suggestions and some questions for clarification, so we should be able to merge this soon.

src/index/Permutation.h Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
src/index/DeltaTriples.h Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
test/DeltaTriplesTest.cpp Outdated Show resolved Hide resolved
@Qup42 Qup42 requested a review from joka921 October 2, 2024 19:26
Copy link

sonarcloud bot commented Oct 2, 2024

@joka921 joka921 marked this pull request as ready for review October 4, 2024 07:14
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Thank you very much for this next step of updates.

@joka921 joka921 merged commit d59bd43 into ad-freiburg:master Oct 4, 2024
19 of 20 checks passed
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