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

Improve Caching #288

Merged
merged 6 commits into from Nov 14, 2019
Merged

Improve Caching #288

merged 6 commits into from Nov 14, 2019

Conversation

niklas88
Copy link
Member

@niklas88 niklas88 commented Oct 1, 2019

Had to recreate PR because Travis CI kept pulling the wrong commit for some reason

The theory behind caching aborted Operations was that they would fail
again anyway. However, under memory pressure Operations may fail due to
failing allocations and will succeed in the future once memory pressure
drops, if we kept them in the cache we wouldn't try again.

While we are at it, improve wording and use an extra abort() method on
Operation.
this allows to mark elements as pinned, meaning they will not be dropped
due to capacity constraints or clear() but only with an explicit erase
(e.g. as used for aborted queries).
@niklas88
Copy link
Member Author

niklas88 commented Oct 1, 2019

@lehmann-4178656ch ah I figured it out. Travis CI does a merge to master and that currently fails because it needs additional changes

They are actually kept in the order of the triple file as seen by the
setVariableColumn() calls in QueryPlanner.cpp
The name always suggested that it carried context per query while in
fact it held the SubtreeCache which should really live for many queries.
Since it is indeed useful to have a per query context we move the
SubtreeCache outside the QueryExecutionContext and make it truly per
query.
This allows to pin all subtrees of a query to the cache and have that as
a per query option. On the QLever server this is exposed as the
"pinsubtrees" URL param. If set to true all subtrees in the query will
be cached. This is especially useful for completion queries and the
like.
@niklas88
Copy link
Member Author

@lehmann-4178656ch same here?

@niklas88
Copy link
Member Author

@lehmann-4178656ch ready to merge?

Copy link
Member

@lehmann-4178656ch lehmann-4178656ch left a comment

Choose a reason for hiding this comment

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

Ready to merge.

@niklas88 niklas88 merged commit 3be704c into ad-freiburg:master Nov 14, 2019
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.

None yet

2 participants