-
Notifications
You must be signed in to change notification settings - Fork 368
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
[feature] delayed_sidekiq strategy #869
Conversation
94605b6
to
80019cd
Compare
80019cd
to
2301e74
Compare
@konalegi could you please review this one please? (and trigger the CI) |
d938e5e
to
921e05c
Compare
@konalegi one more time, please. Got failed CI due to no Redis service running. |
@skcc321 Thank you very much for the PR, I'll try to review this in a week or find someone who can do it. |
921e05c
to
6434366
Compare
@konalegi one more time CI, please (I hope the last one) - fixed linters & ruby 2.x related failed tests. |
@konalegi sorry for bothering you. Any updates on that one? |
@skcc321, sorry, everyone is busy these days. I'll try to review this on Thursday/Friday, added my Todo list |
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 for the contribution. I've added some early comments, I didn't have time to test it properly.
387181c
to
7fce23a
Compare
@mrzasa thank you for the review. I pushed all suggested changes in a separate commit (just for easier review next time). |
87b13a6
to
d1475da
Compare
d1475da
to
7d6e070
Compare
@konalegi sorry for bothering you, could you please trigger the CI again? |
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.
Sorry for making you wait for so long.
Looks good to me, I'll need to do some manual testing, if everything will be nice, I'll merge it.
Thank you @konalegi. I'll work on your comments soon. |
@konalegi could you please trigger the CI and look through the latest changes? |
LGTM, please address my last comment and rubocop offense. |
@konalegi done. Please take a look at the latest commit. |
@mrzasa could approve please (if you have no concerns) :) |
Since this PR doesn't modify any existing functionality and brings new feature going to be merge right away. Will be released on Monday |
Released |
What does it do?
I added a new strategy -
delayed_sidekiq
.It behaves the next way:
latency
option (for instance 10 seconds),margin
&reindex_wrapper
margin
option is important to coverreplication_lag
an example:
those three parallel requests that happened during the "latency" window are going to schedule a single worker to call import with all accumulated ids 1, 2, 3
Strategy option in #import method.
Accumulation of :update_fields option between chunks.
will cause
that can be very useful if you have some complex crutches in the index definition and you don't want to load the database with obviously useless SQL queries.
Configuration
CityIndex
levelBefore submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).