-
Notifications
You must be signed in to change notification settings - Fork 813
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
Piggy back archival uploading progress on heartbeat details #1963
Conversation
Also fixed #1959 |
34e9cab
to
ff66bfa
Compare
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.
Looking solid, thanks for doing all this unit test work as well :)
currIteratorState, err := historyBlobIterator.GetState() | ||
if err == nil { | ||
progress.IteratorState = currIteratorState | ||
progress.BlobPageToken = pageToken |
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.
It feels weird to me that BlobPageToken and UploadedBlobs can become out of sync. The way I am reading this code is that progress.BlobPageToken represents the highest blob page you have successfully uploaded so far. But in the case where historyBlobIterator.GetState() returns error you get a progress which has a blob in UploadedBlobs with a higher page than progress.BlobPageToken
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.
Updated, but I still feel a little bit weird as I think progress.UploadedBlobs should always reflect what has been uploaded. In the case when GetState() returns an error, the blob is still uploaded successfully, so I think progress should still be updated.
archiverTestMetrics.On("IncCounter", metrics.ArchiverScope, metrics.ArchiverDeleteLocalSuccessCount).Once() | ||
archiverTestLogger.On("Error", mock.Anything, mock.Anything).Once() | ||
|
||
env := s.NewTestWorkflowEnvironment() | ||
env.OnActivity(uploadHistoryActivityFnName, mock.Anything, mock.Anything).Return(workflow.NewTimeoutError(shared.TimeoutTypeStartToClose)) | ||
env.OnActivity(deleteBlobActivityFnName, mock.Anything, mock.Anything).Return(nil) | ||
env.OnActivity(uploadHistoryActivityFnName, mock.Anything, mock.Anything).Return(nil, workflow.NewTimeoutError(shared.TimeoutTypeStartToClose)) |
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.
Will add timeout details after client side test framework is fixed.
currIteratorState, err := historyBlobIterator.GetState() | ||
if err == nil { | ||
progress.IteratorState = currIteratorState | ||
progress.BlobPageToken = pageToken |
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.
Updated, but I still feel a little bit weird as I think progress.UploadedBlobs should always reflect what has been uploaded. In the case when GetState() returns an error, the blob is still uploaded successfully, so I think progress should still be updated.
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.
I am okay with either place for recoding blob uploaded, your call.
Looks good :)
#1536