@@ -306,6 +306,7 @@ func (eh *history) verifyAllEventsProcessed() error {
306
306
307
307
func (eh * history ) nextDecisionEvents () (nextEvents []* s.HistoryEvent , markers []* s.HistoryEvent , historySizeEstimation int , err error ) {
308
308
if eh .currentIndex == len (eh .loadedEvents ) && ! eh .hasMoreEvents () {
309
+ eh .eventsHandler .logger .Info ("Returning 0 for historySizeEstimation" )
309
310
if err := eh .verifyAllEventsProcessed (); err != nil {
310
311
return nil , nil , 0 , err
311
312
}
@@ -965,6 +966,7 @@ func (w *workflowExecutionContextImpl) ProcessWorkflowTask(workflowTask *workflo
965
966
ProcessEvents:
966
967
for {
967
968
reorderedEvents , markers , binaryChecksum , historySizeEstimation , err := reorderedHistory .NextDecisionEvents ()
969
+ w .wth .logger .Info (fmt .Sprintf ("The size estimation of history events for workflow task: %v," , historySizeEstimation ))
968
970
if err != nil {
969
971
return nil , err
970
972
}
@@ -1013,6 +1015,7 @@ ProcessEvents:
1013
1015
if isLast {
1014
1016
w .workflowInfo .TotalHistoryBytes += int64 (historySizeEstimation )
1015
1017
w .wth .logger .Info ("DIfferences between history size estimation and actual size" ,
1018
+ zap .Int ("HistoryEstimation" , historySizeEstimation ),
1016
1019
zap .Int64 ("HistorySizeEstimation" , w .workflowInfo .TotalHistoryBytes ),
1017
1020
zap .Int64 ("ActualHistorySize" , w .workflowInfo .HistoryBytesServer ),
1018
1021
zap .Int64 ("HistorySizeDiff" , w .workflowInfo .TotalHistoryBytes - w .workflowInfo .HistoryBytesServer ))
0 commit comments