-
Notifications
You must be signed in to change notification settings - Fork 800
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
Expose workflow history size and count to client #5392
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… modified getMutatbleState to not return history Count (since it is just nextEventID - 1)
Add mapper function sync idl change of adding js Remove logger and modify test due to thrift file change Refractor HistorySize to TotalSizeBytes sync cadence-idl
timl3136
force-pushed
the
expose-history
branch
from
September 6, 2023 23:52
c4f1516
to
efab902
Compare
Shaddoll
reviewed
Sep 7, 2023
Shaddoll
reviewed
Sep 7, 2023
Shaddoll
reviewed
Sep 7, 2023
Shaddoll
reviewed
Sep 7, 2023
Shaddoll
reviewed
Sep 7, 2023
@@ -413,6 +413,7 @@ func CreateMatchingPollForDecisionTaskResponse(historyResponse *types.RecordDeci | |||
ScheduledTimestamp: historyResponse.ScheduledTimestamp, | |||
StartedTimestamp: historyResponse.StartedTimestamp, | |||
Queries: historyResponse.Queries, | |||
TotalHistoryBytes: historyResponse.HistorySize, |
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.
Do we expose historyCount?
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.
Yes, the historyCount is equivalent to NextEventID - 1
Shaddoll
approved these changes
Sep 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Added fields regarding workflow history size and count in PollForDecisionResponse to be exposed to cadence-client.
History size will be exposed in unit of bytes and history count will be the number of completed events.
Added fields sending history data from cadence-history to cadence-matching when matching service calls the persistence layer.
Updated dependency for cadence-idl to include new fields in idl in sync with cadence-client.
Why?
There have been requests from customers wanting history information regarding workflow to be exposed in client so that they can optimize their workflow through methods like continueAsNew when approaching the history size limit.
Resolved cadence-client issue #917
How did you test it?
Standard unit test as well as tested in development environment.
Potential risks
Since we have added new fields to thrift and proto layer, there should not be any breaking change since new fields will be defaulted to 0. However, there remains the possibility that the change will result in thrift/proto field mismatch between serve and client hence result in information loss.
Release notes
Documentation Changes