Fix idxInSync, WaitUntilIndexesAreSynced, and TestNames#301
Fix idxInSync, WaitUntilIndexesAreSynced, and TestNames#301decentral1se merged 2 commits intossbc:masterfrom
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 |
|
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. |
cryptix
left a comment
There was a problem hiding this comment.
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.modif that pull request hasn't yet been merged.This fixes #251 and #250 by fixing
idxInSync,WaitUntilIndexesAreSynced(), andTestNames(). I ranTestNamesover 500 times with zero failures with this in place.