Skip to content
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(EventRescheduler): catch exception for event service restart #446

Merged
merged 5 commits into from
Feb 3, 2023

Conversation

jaeopt
Copy link
Contributor

@jaeopt jaeopt commented Jan 24, 2023

Summary

Rare exceptions (IllegalStateException: "WorkManager is not initialized properly...") when WorkManager.getInstance() is called even without any custom WorkManager configuration. It looks like a WorkManager timing issue.
Those rare exceptions are gracefully handled with this fix. It's safe since event-dispatch service will be scheduled again on next events.

Test plan

  • Add a unit test

Issues

@jaeopt jaeopt requested a review from a team as a code owner January 24, 2023 22:53
@jaeopt jaeopt removed their assignment Jan 24, 2023
@jaeopt jaeopt requested a review from mnoman09 January 24, 2023 22:54
Copy link
Contributor

@mnoman09 mnoman09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes lgtm. Just a minor concern, that this seems like a quick but temporary fix, we might have to identify the root cause of exception instead of suppressing it. But I am approving it so this could get merged soon as possible.

* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
// Copyright 2016,2021,2023, Optimizely, Inc. and contributors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we revert this change and just add 2023

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnoman09 I have been changing the copyright format to open-ended (//...) gradually.

@jaeopt
Copy link
Contributor Author

jaeopt commented Feb 2, 2023

Overall changes lgtm. Just a minor concern, that this seems like a quick but temporary fix, we might have to identify the root cause of exception instead of suppressing it. But I am approving it so this could get merged soon as possible.

A good point. We'll keep following on this issue.

@jaeopt jaeopt merged commit 585f099 into master Feb 3, 2023
@jaeopt jaeopt deleted the jae/8632-workerscheduler-crash branch February 3, 2023 00:00
mnoman09 pushed a commit that referenced this pull request Mar 10, 2023
mnoman09 added a commit that referenced this pull request Mar 16, 2023
* fix(EventRescheduler): catch exception for event service restart (#446)

(cherry picked from commit 585f099)

* [FSSDK-8952] doc: Full Stack to Feature Experimentation Rename (#450)

* [FSSDK-8952] doc: Full Stack to Feature Experimentation Rename

---------

Co-authored-by: mnoman09 <m.nomanshoaib09@gmail.com>
(cherry picked from commit 390c464)

* changed java version to 3.10.3

* [FSSDK-8952] chore: prepare for release 3.13.4 (#452)

* chore: prepare for release 3.13.4

* set java core version to 3.10.3

* removed comment

* Revert "removed comment"

This reverts commit a326808.

* Revert "set java core version to 3.10.3"

This reverts commit fe586f6.

---------

(cherry picked from commit cbcdd1e)

---------

Co-authored-by: Jae Kim <45045038+jaeopt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants