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

refactor historyEngineImpl.getMutableStateOrPolling #6584

Conversation

dkrotx
Copy link
Member

@dkrotx dkrotx commented Jan 2, 2025

What changed?
Extracted longPolling part to a separate method so it is easier to read.
Essentially, there are two distinct parts:

  1. getting mutable state immediately
  2. waiting for the desired eventID to appear in a running workflow

Initial 150+ lines code is just hard to read because two different
things are combined in one.

Why?
Refactroring before bugfixing.

How did you test it?
Unit-tests

Potential risks

Release notes

Documentation Changes

Refactroring before bugfixing.
Extracted longPolling part to a separate method so it is easier to read.
Essentially, there are two distinct parts:
1) getting mutable state immediately
2) waiting for the desired eventID to appear in a running workflow

Initial 150+ lines code is just hard to read because two different
things are combined in one.
@dkrotx dkrotx merged commit d81979a into cadence-workflow:master Jan 3, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants