func skipDeterministicCheckForUpsertChangeVersion(events []*s.HistoryEvent, idx int) bool {
	e := events[idx]
	if e.GetEventType() == s.EventTypeMarkerRecorded &&
		e.MarkerRecordedEventAttributes.GetMarkerName() == versionMarkerName &&
		idx < len(events)-1 &&
		events[idx+1].GetEventType() == s.EventTypeUpsertWorkflowSearchAttributes {
		if _, ok := events[idx+1].UpsertWorkflowSearchAttributesEventAttributes.SearchAttributes.IndexedFields[CadenceChangeVersion]; ok {
			return true
		}
	}
	return false
}
// special check for upsert change version event
special check for upsert change version event
// special check for upsert change version event
func skipDeterministicCheckForUpsertChangeVersion(events []*s.HistoryEvent, idx int) bool {
	e := events[idx]
	if e.GetEventType() == s.EventTypeMarkerRecorded &&
		e.MarkerRecordedEventAttributes.GetMarkerName() == versionMarkerName &&
		idx < len(events)-1 &&
		events[idx+1].GetEventType() == s.EventTypeUpsertWorkflowSearchAttributes {
		if _, ok := events[idx+1].UpsertWorkflowSearchAttributesEventAttributes.SearchAttributes.IndexedFields[CadenceChangeVersion]; ok {
			return true
		}
	}
	return false
}
func skipDeterministicCheckForUpsertChangeVersion ( events [ ] * s . HistoryEvent , idx int ) bool { e := events [ idx ] if e . GetEventType ( ) == s . EventTypeMarkerRecorded && e . MarkerRecordedEventAttributes . GetMarkerName ( ) == versionMarkerName && idx < len ( events ) - 1 && events [ idx + 1 ] . GetEventType ( ) == s . EventTypeUpsertWorkflowSearchAttributes { if _ , ok := events [ idx + 1 ] . UpsertWorkflowSearchAttributesEventAttributes . SearchAttributes . IndexedFields [ CadenceChangeVersion ] ; ok { return true } } return false }
special check for upsert change version event
special check for upsert change version event