-
Notifications
You must be signed in to change notification settings - Fork 53
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
fix: Handle multiple child index joins #2867
fix: Handle multiple child index joins #2867
Conversation
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.
LGTM! Thanks Andy for the quick fix
internal/db/fetcher/indexer.go
Outdated
f.indexedFields = nil | ||
f.docFields = nil | ||
f.indexIter = nil | ||
f.execInfo = ExecInfo{} |
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.
suggestion: f.execInfo.Reset()
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.
Oh nice, thanks Islam :)
- f.execInfo.Reset()
At the moment it panics when executing the request (same error as in ticket).
Note, DocIndexes are not supported in inner request results, hence we have to tolerate a few new docIDs in the short term.
5745d53
to
76a9e0d
Compare
{ | ||
"devices": []map[string]any{ | ||
{ | ||
"owner_id": "bae-1ef746f8-821e-586f-99b2-4cb1fb9b782f", |
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.
note: if you wait for #2871 to merge you will be able to use testUtils.NewDocIndex
for these too.
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.
Yeah, I might do that, then you can merge before you log off - the CI runners seem to be in short supply atm though :(
If you don't merge #2871 within an hour I'll assume you or the CI is sleeping and merge this to unblock the partner/David
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.
no worries, if you merge first, I can change your asserts in my PR
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2867 +/- ##
===========================================
+ Coverage 79.39% 79.44% +0.05%
===========================================
Files 323 323
Lines 24681 24692 +11
===========================================
+ Hits 19595 19615 +20
+ Misses 3681 3677 -4
+ Partials 1405 1400 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Relevant issue(s)
Resolves #2862
Description
Handles multiple child index joins.
Init is called multiple times (IIRC when joining in this direction it is called 1+NPrimaryDocs times) and the state was preserved between calls. The new
resetState
func duplicates the overwriting of props set in init, but I see that as worth it (very cheap, and means devs don't have to care what is set outside of the constructor).