Skip to content

Commit

Permalink
update errors in history store
Browse files Browse the repository at this point in the history
  • Loading branch information
yux0 authored Jan 14, 2021
1 parent 5fe78d2 commit b05b60e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions common/persistence/historyStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (m *historyV2ManagerImpl) readRawHistoryBranch(
}

if token.CurrentRangeIndex == notStartedIndex {
return nil, nil, 0, nil, &types.InternalServiceError{
return nil, nil, 0, nil, &types.InternalDataInconsistencyError{
Message: fmt.Sprintf("branchRange is corrupted"),
}
}
Expand Down Expand Up @@ -463,7 +463,7 @@ func (m *historyV2ManagerImpl) readHistoryBranch(
}
if len(events) == 0 {
logger.Error("Empty events in a batch")
return nil, nil, nil, 0, 0, &types.InternalServiceError{
return nil, nil, nil, 0, 0, &types.InternalDataInconsistencyError{
Message: fmt.Sprintf("corrupted history event batch, empty events"),
}
}
Expand All @@ -478,7 +478,7 @@ func (m *historyV2ManagerImpl) readHistoryBranch(
tag.FirstEventVersion(firstEvent.GetVersion()), tag.WorkflowFirstEventID(firstEvent.GetEventID()),
tag.LastEventVersion(lastEvent.GetVersion()), tag.WorkflowNextEventID(lastEvent.GetEventID()),
tag.Counter(eventCount))
return nil, nil, nil, 0, 0, &types.InternalServiceError{
return nil, nil, nil, 0, 0, &types.InternalDataInconsistencyError{
Message: fmt.Sprintf("corrupted history event batch, wrong version and IDs"),
}
}
Expand All @@ -504,7 +504,7 @@ func (m *historyV2ManagerImpl) readHistoryBranch(
tag.LastEventVersion(lastEvent.GetVersion()), tag.WorkflowNextEventID(lastEvent.GetEventID()),
tag.TokenLastEventVersion(token.LastEventVersion), tag.TokenLastEventID(token.LastEventID),
tag.Counter(eventCount))
return nil, nil, nil, 0, 0, &types.InternalServiceError{
return nil, nil, nil, 0, 0, &types.InternalDataInconsistencyError{
Message: fmt.Sprintf("corrupted history event batch, eventID is not continouous"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion service/history/replication/task_ack_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ func (s *taskAckManagerSuite) TestGetTasks_ReturnDataErrors() {
taskID := int64(10)
taskInfo := &persistence.ReplicationTaskInfo{
TaskType: persistence.ReplicationTaskTypeHistory,
TaskID: taskID+1,
TaskID: taskID + 1,
DomainID: domainID,
WorkflowID: workflowID,
RunID: runID,
Expand Down

0 comments on commit b05b60e

Please sign in to comment.