chore(query): replace UUIDs with canonical keys and add observers#2923
chore(query): replace UUIDs with canonical keys and add observers#2923
Conversation
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (74.45%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2923 +/- ##
===========================================
+ Coverage 49.07% 74.45% +25.39%
===========================================
Files 420 488 +68
Lines 54148 60194 +6046
===========================================
+ Hits 26569 44814 +18245
+ Misses 24863 12232 -12631
- Partials 2716 3148 +432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tstirrat15
left a comment
There was a problem hiding this comment.
The question about the reversed arrow iterator is the only thing I'm concerned about
pkg/query/analyze.go
Outdated
|
|
||
| // Write iterator name and ID (truncated for readability) | ||
| fmt.Fprintf(sb, "%s (ID: %s)\n", explain.Info, iterID[:8]) | ||
| fmt.Fprintf(sb, "%s (Hash: %016x)\n", explain.Info, iterID) |
There was a problem hiding this comment.
is this the format string for "base 16?"
There was a problem hiding this comment.
016x == 0-padded 16-length (which, for hex bytes is correct; 8 bytes of two hex characters) and the x is hexadecimal
pkg/query/datastore.go
Outdated
| return func(yield func(Path, error) bool) { | ||
| var cursor *tuple.Relationship | ||
| iteratorID := r.ID() + ":iter_subjects" | ||
| iteratorID := fmt.Sprintf("%x:iter_subjects", r.Hash()) |
There was a problem hiding this comment.
yeah, let's make this one match
| left: a.left, | ||
| right: a.right, | ||
| direction: rightToLeft, | ||
| canonicalKey: a.canonicalKey, |
There was a problem hiding this comment.
Is the direction of the iterator not a part of the set of args for the purposes of canonicalization?
There was a problem hiding this comment.
Correct. We don't care which way the arrow points to evaluate the set, the set is the same either way (and so canonical)
efa88a2 to
fecf50a
Compare
fecf50a to
1d9126d
Compare
Pull Request is not mergeable
cd920bb to
4399d70
Compare
tstirrat15
left a comment
There was a problem hiding this comment.
I like the observer changes, but have some questions about thread safety
4399d70 to
772b71c
Compare
Description
Testing
References