-
Notifications
You must be signed in to change notification settings - Fork 65
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
Give each index a (reasonably) unique ID #984
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #984 +/- ##
=======================================
Coverage 85.80% 85.81%
=======================================
Files 308 308
Lines 29261 29266 +5
Branches 3430 3430
=======================================
+ Hits 25108 25114 +6
- Misses 2787 2789 +2
+ Partials 1366 1363 -3 ☔ View full report in Codecov by Sentry. |
Kudos, SonarCloud Quality Gate passed!
|
2d3d8b6
to
3b21d2d
Compare
b71939e
to
fc11809
Compare
2872384
to
66d5893
Compare
Kudos, SonarCloud Quality Gate passed!
|
de346a8
to
fd77641
Compare
fd77641
to
7938778
Compare
Kudos, SonarCloud Quality Gate passed!
|
Kudos, SonarCloud Quality Gate passed!
|
The ID is a string that can be obtained via the API with cmd=get-index-id. It is currently just a concatenation of the index name and several statistics on the number of triples (which is reasonably but not perfectly unique). This feature is useful for applications like https://github.com/ad-freiburg/qlever-petrimaps, which have an internal cache that depends on the index. When the index changes, the application should be able to notice this an clear its cache. With an index ID it can.
|
@joka921 This has been lying around for some time now (and has already been in active use for month). It's simplistic but good enough IMO. I just rebased it to the current master and added a simple test. Please have a quick look and let me know whether you want anything changed before we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can extend this in the future, but as it seems, this works for your current use case (knowledge graphs only tend to grow, so the probability of false positives is very low),
so you can merge this as is.
The index ID is currently just a concatenation of the index name, and the number of triples, subjects, predicates, and objects. This makes it unlikely (but not impossible) that two different indexes have the same ID. The ID can be obtained via the API with
cmd=get-index-id
.This feature is useful for applications like https://github.com/ad-freiburg/qlever-petrimaps, which have an internal cache that depends on the index. When the index changes, the application should be able to notice that, and with the index ID, it now can.