Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork124
Parallel import with trackable jobs.#275
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
… package name.Makefile added option to run larastan seperately.gitignore added "/build/".
Updated StageInterface, updated existing stages to include the new interface methods.Changed PullFromSource to instead of being multiple instance, be one and iterable.Added PullFromSourceParallel to handle parallel import.
Thank you for your great work on this pull request! I really appreciate your effort to integrate the parallel import feature. Here are a few areas where I believe we could improve the implementation:
Thank you once again for your contribution! Looking forward to your thoughts and further improvements. |
Trackable-Job package added to composer as a suggestion.styleci.
mateusjunges/laravel-trackable-jobs should be installed into test envhttps://github.com/matchish/laravel-scout-elasticsearch/blob/master/.github/workflows/test-application.yaml |
Added tracked-jobs package to github/workflows.
matchish commentedMay 13, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ensure that the master branch of the fork is synchronized with this repository, or add this line to your branch.
|
DavisPuciriuss commentedMay 13, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Synchronized this PR with master branch. |
The master branch on the fork is now synced aswell. Missed previously that you mentioned that it needs to be synced on the master branch. |
could you push a new commit. for example readme update with section about parallel feature. let's see if it will run new workflow |
or close this pr and open new one |
codecov-commenter commentedMay 15, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## 8.x #275 +/- ##============================================+ Coverage 95.99% 98.11% +2.12%- Complexity 194 255 +61============================================ Files 36 40 +4 Lines 624 797 +173 ============================================+ Hits 599 782 +183+ Misses 25 15 -10 ☔ View full report in Codecov by Sentry. |
First two points for sure done. Also plz apply diff from stylecidiff file |
Hey, applied the diff from styleci. Progress Visibility: If this is meant as the progress bar within console, when importing. Then this is already done and there is a test for this specifically here: Cancel Overlapping Imports: Would like some more explanation on this, as currently cancelling the parallel import it will not continue to pull in data from DB, but will finish the pending jobs. Is there a way to detect if someone has cancelled the current import ? Backward Compatibility: The major changes are within StageInterface and ImportSource interfaces. Both of these interfaces have new functions. In the StageInterface case, the problem was providing the next PullFromSource with the lastId for usage in forPageAfterId(). Solved this by adding a completed() method, allowing some stages to become iterable. |
matchish commentedMay 15, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I believe proper way is to check if there are started/pending import jobs and cancelling them before to start a new import. otherwise could be overlapping with jobs that not cancelled yet from previous import. |
Okay, will make some changes tomorrow with in-progress or pending jobs, when starting another import job. What about the other two points, are those fine or should I make some changes there aswell ? |
I have to dive deeper. Can't answer now |
This has been added, if you start a new import, the previous one will cancel. |
I’m not sure when I can dive deep into the code. There are some things to polish, but overall, it looks fine. Since the code is not backward compatible and to avoid blocking the release, I propose releasing it as |
If agree plz update Changelog and we can release |
Hey, great to hear back from you. |
Releasing. Huge thanks to@DavisPuciriuss! Your contribution is a significant step forward for the project. |
Uh oh!
There was an error while loading.Please reload this page.
Continuation of#78.
Added FromScope, that uses forPageAfterId instead of forPage.
Added a new option within ImportCommand - "--parallel".
This option requires user to set-up async job handler within their configuration.
Main thread continues to pull data from the database, while workers handle making the data searchable.
For the parallel import to work, addedTrackable-Jobs package, that looks to be actively maintained.
Updated the existing tests to pass, and added few tests to handle synced parallel import.
Started to make changes for larastan.
Performance testing (~250k records, mysql):
~600 seconds.
~350 seconds.
~245 seconds.
Will appreciate any feedback on what should be improved for this PR to be merged.