Skip to content

Conversation

@Qup42
Copy link
Member

@Qup42 Qup42 commented Nov 13, 2025

The where clauses of updates are directly evaluated against the DeltaTriples instead of a Snapshot. (We can do this because we have an exclusive lock on the DeltaTriples and can ensure that nothing changes the state while evaluting the where clause.) This is achieved by storing the corresponding state of the DeltaTriples in the LocatedTriplesVersion (formerly LocatedTriplesSnapshot). Where clauses are evaluated against such LocatedTriplesVersions. The change brings two major advantages:

  1. chained updates (multiple updates separated with ;) no longer require explicit copying snapshots at all, improving the performance of many small updates chained updates during many already updated triples
  2. the intermediate state of the update does not leak out (free bonus)

cancellationHandle);
auto responses = co_await std::move(coroutine);
tracer.endTrace("update");
responses.push_back(tracer.getJSONShort());
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently the snapshot, metadata update and disk write back time would be after the last update. This is a hack to obtain some visibility into these parts, but not final. Requires #2463 to function correctly.

@Qup42 Qup42 requested a review from RobinTF November 13, 2025 20:20
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 40.54054% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.14%. Comparing base (b6513dc) to head (88ca71b).

Files with missing lines Patch % Lines
src/engine/Server.cpp 0.00% 38 Missing ⚠️
src/index/DeltaTriples.h 50.00% 2 Missing ⚠️
src/index/Index.cpp 50.00% 2 Missing ⚠️
src/index/IndexImpl.cpp 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2500      +/-   ##
==========================================
- Coverage   91.14%   91.14%   -0.01%     
==========================================
  Files         467      467              
  Lines       39816    39817       +1     
  Branches     5325     5327       +2     
==========================================
- Hits        36292    36291       -1     
- Misses       2015     2017       +2     
  Partials     1509     1509              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

[[nodiscard]] const Index& getIndex() const { return _index; }

const LocatedTriplesSnapshot& locatedTriplesSnapshot() const {
const LocatedTriplesState& locatedTriplesSnapshot() const {
Copy link
Member Author

Choose a reason for hiding this comment

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

If we stay with these names then rename all the downstream functions and variables to keep it consistent?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense

Copy link
Collaborator

@RobinTF RobinTF left a comment

Choose a reason for hiding this comment

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

Not much to add from my side.

[[nodiscard]] const Index& getIndex() const { return _index; }

const LocatedTriplesSnapshot& locatedTriplesSnapshot() const {
const LocatedTriplesState& locatedTriplesSnapshot() const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense

# Conflicts:
#	src/index/Permutation.cpp
#	src/index/Permutation.h
# Conflicts:
#	src/engine/QueryExecutionContext.h
#	src/index/DeltaTriples.cpp
#	src/index/Index.cpp
#	src/index/Index.h
#	src/index/IndexImpl.cpp
#	src/index/IndexImpl.h
@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Failed ❌ Intended ⚠️ Not tested
525 439 19 67 0

Conformance check passed ✅

No test result changes.

Details: https://qlever.dev/sparql-conformance-ui?cur=88ca71bcb1dd1da0d6c3f0883e9469798d49a69f&prev=b6513dc51bbdce9118e4a3911c9d93194c710536

@sonarqubecloud
Copy link

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