Skip to content

Commit aea7ba9

Browse files
committed
add logger
1 parent fb247eb commit aea7ba9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/internal_task_handlers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ func (eh *history) verifyAllEventsProcessed() error {
306306

307307
func (eh *history) nextDecisionEvents() (nextEvents []*s.HistoryEvent, markers []*s.HistoryEvent, historySizeEstimation int, err error) {
308308
if eh.currentIndex == len(eh.loadedEvents) && !eh.hasMoreEvents() {
309+
eh.eventsHandler.logger.Info("Returning 0 for historySizeEstimation")
309310
if err := eh.verifyAllEventsProcessed(); err != nil {
310311
return nil, nil, 0, err
311312
}
@@ -965,6 +966,7 @@ func (w *workflowExecutionContextImpl) ProcessWorkflowTask(workflowTask *workflo
965966
ProcessEvents:
966967
for {
967968
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))
968970
if err != nil {
969971
return nil, err
970972
}
@@ -1013,6 +1015,7 @@ ProcessEvents:
10131015
if isLast {
10141016
w.workflowInfo.TotalHistoryBytes += int64(historySizeEstimation)
10151017
w.wth.logger.Info("DIfferences between history size estimation and actual size",
1018+
zap.Int("HistoryEstimation", historySizeEstimation),
10161019
zap.Int64("HistorySizeEstimation", w.workflowInfo.TotalHistoryBytes),
10171020
zap.Int64("ActualHistorySize", w.workflowInfo.HistoryBytesServer),
10181021
zap.Int64("HistorySizeDiff", w.workflowInfo.TotalHistoryBytes-w.workflowInfo.HistoryBytesServer))

0 commit comments

Comments
 (0)