-
Notifications
You must be signed in to change notification settings - Fork 23
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 idxInSync, WaitUntilIndexesAreSynced, and TestNames #301
Conversation
Oh, and the CI tests will fail with this, because they're not going to be using the updated version of Luigi. |
Oh wow! I will try to have a look at this later this week. re go.mod: once you pushed your working branch you should be able to |
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.
Thanks! The first way I built this (which worked) was to pass in idxInSync as a WaitGroup pointer. But then I realized we can't reference count that to later query if indexes are caught up, which we need to gracefully fix this: So I went with the callback method instead, which also opens up more options for other users of Luigi to implement status checking in other ways if they so choose. And now we can do "index busy" reference counting using atomic operations to give a status of how many indexes are out of sync. We can also use this to update the index status codes, so the callback method IMHO is far superior for flexibility. |
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.
Super down to trying this! Thanks for combing through this.
Left a comment on the luigi PR.
ssbc/go-luigi#4 has landed, let's rebase & merge here too 👏 I think |
Ah sure I can do the luigi work after the merge, thanks for all this work @KyleMaas! |
Excellent. Thanks! |
Requires ssbc/go-luigi#4, so be sure to add:
...or something like it to
go.mod
if that pull request hasn't yet been merged.This fixes #251 and #250 by fixing
idxInSync
,WaitUntilIndexesAreSynced()
, andTestNames()
. I ranTestNames
over 500 times with zero failures with this in place.