-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Cron - fix getting warning log after the first failed job lock retry #29784
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
base: 2.4-develop
Are you sure you want to change the base?
Cron - fix getting warning log after the first failed job lock retry #29784
Conversation
Hi @oleksii-lisovyi. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
Hi @oleksii-lisovyi. Thank you for your collaboration. It totally makes sense.
Once all attempts have spent the system will say
What do you think? Also, I would ask you to cover your change with a simple unit test. Thank you! |
@rogyar, thank you for the comment. So we can end up with logging a |
Hi @oleksii-lisovyi. That sounds fair enough. Please, proceed. Thank you! |
Sorry for a long inactivity. I've had a vacation and simply forgot about the issue. |
@magento run all tests |
Hi @oleksii-lisovyi. Thank you for your contribution. According to the definition of done all changes should be covered by automated tests. You may cover this particular case by extending the existing integration test. Thank you! |
Any updates here? @Den4ik maybe? PR makes sense to me, I'm currently investigating a bunch of |
It looks like this got fixed in ACP2E-82: Same cron job executes twice, this fix got included in Magento 2.4.4 and higher. If you're curious like I why So, I think this PR can be closed 🙂 |
Description (*)
Currently there is provided a re-try mechanism for cron job locking, that write
warning
log message after each failed try.The issue is that the warning doesn't actually represent any issue if the lock is successfully happened on the next try.
Similarly to the re-try mechanisms for MySQL PDO Adapter and Queue Message I propose to write the only
critical
log message if the lock doesn't happen after all 5 tries.Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
No sure how to test this case manually.
Questions or comments
Contribution checklist (*)