}
ms.approximateSize -= ms.chasmNodeSizes[nodePath]
delete(ms.chasmNodeSizes, nodePath)
}
newSize := len(nodePath) + node.Size()
ms.approximateSize += newSize - ms.chasmNodeSizes[nodePath]
Frontier kind: Code frontier
unlabeled · c_67bd6464828c
271 tests · 4182 LOC · 165 files · introduces 0 tests · 90 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedgo.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsgo.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_Nilgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappinggo.temporal.io/server/common/namespace/TestDefaultReplicationResolver_FailoverVersion/negative_versiongo.temporal.io/server/common/namespace/TestDefaultReplicationResolver_FailoverVersion/positive_versiongo.temporal.io/server/common/namespace/TestDefaultReplicationResolver_FailoverVersion/zero_versiongo.temporal.io/server/common/metrics/TestTagsCacheKey/different_keysgo.temporal.io/server/common/metrics/TestTagsCacheKey/different_orderinggo.temporal.io/server/common/metrics/TestTagsCacheKey/different_valuesgo.temporal.io/server/common/metrics/TestTagsCacheKey/identical_multi_tagsgo.temporal.io/server/common/metrics/TestTagsCacheKey/identical_single_tagsgo.temporal.io/server/common/metrics/TestTagsCacheKey/key_boundary_ambiguitygo.temporal.io/server/common/metrics/TestTagsCacheKey/single_vs_multigo.temporal.io/server/common/metrics/TestTagsCacheKey_NoCollisionsForEmbeddedNullsEvery collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 90 introduced LOC across 30 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
}
ms.approximateSize -= ms.chasmNodeSizes[nodePath]
delete(ms.chasmNodeSizes, nodePath)
}
newSize := len(nodePath) + node.Size()
ms.approximateSize += newSize - ms.chasmNodeSizes[nodePath]
}
if err := ms.closeTransactionUpdateTransitionHistory(
transactionPolicy,
// todo@TimeSkipping, we can move update versioned transition to inside closeTransactionHandleWorkflowTimeSkipping
transactionPolicy,
)
ms.closeTransactionTrackTombstones(transactionPolicy, chasmNodesMutation)
// generate tasks
if err := ms.closeTransactionPrepareTasks(
transactionPolicy,
eventBatches,
clearBuffer,
regenTimerTasksForWorkflowTimeSkipping,
); err != nil {
return closeTransactionResult{}, err
}
ms.executionInfo.LastUpdateTime = timestamppb.New(ms.timeSource.Now())
// We generate checksum here based on the assumption that the returned
// snapshot object is considered immutable. As of this writing, the only
// code that modifies the returned object lives inside Context.resetWorkflowExecution.
// Currently, the updates done inside Context.resetWorkflowExecution don't
// impact the checksum calculation.
checksum := ms.generateChecksum()
if ms.dbRecordVersion == 0 {
// noop, existing behavior
ms.dbRecordVersion += 1
}
workflowEventsSeq: workflowEventsSeq,
bufferEvents: bufferEvents,
clearBuffer: clearBuffer,
checksum: checksum,
chasmNodesMutation: chasmNodesMutation,
}, nil
}
func (ms *MutableStateImpl) closeTransactionTrackLastUpdateVersionedTransition(
transactionPolicy historyi.TransactionPolicy,
if transactionPolicy != historyi.TransactionPolicyActive {
// TODO: replication/standby logic will need a different way for updating LastUpdatedVersionedTransition
// when reapplying history, especially when history replication tasks got batched.
transactionPolicy historyi.TransactionPolicy,
chasmNodesMutation chasm.NodesMutation,
if transactionPolicy != historyi.TransactionPolicyActive {
// Passive/Replication logic will update tombstone list when applying mutable state
// snapshot or mutation.
clearBufferEvents bool,
regenerateTimerTasksForTimeSkipping bool,
if err := ms.closeTransactionHandleWorkflowResetTask(
transactionPolicy,
); err != nil {
return err
}
if err := ms.taskGenerator.GenerateDirtySubStateMachineTasks(ms.shard.StateMachineRegistry()); err != nil {
mutable_state_impl.go
return err
}
if err := ms.closeTransactionGenerateChasmRetentionTask(transactionPolicy); err != nil {
return err
}
// regardless of how many activity & user timer created
// so the calculation must be at the very end
if err := ms.closeTransactionHandleActivityUserTimerTasks(transactionPolicy); err != nil {
mutable_state_impl.go
return err
}
if err := ms.closeTransactionRegenTimerTasksForWorkflowTimeSkipping(transactionPolicy); err != nil {
return err
}
return ms.closeTransactionPrepareReplicationTasks(transactionPolicy, eventBatches, clearBufferEvents)
mutable_state_impl.go
}
func (ms *MutableStateImpl) closeTransactionGenerateChasmRetentionTask(
transactionPolicy historyi.TransactionPolicy,
if ms.IsWorkflow() ||
ms.executionState.State != enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED ||
ms.stateInDB == enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED {
return nil
}
eventBatches [][]*historypb.HistoryEvent,
clearBufferEvents bool,
var replicationTasks []tasks.Task
if ms.config.ReplicationMultipleBatches() {
task, err := ms.eventsToReplicationTask(transactionPolicy, eventBatches)
if err != nil {
}
replicationTasks = append(replicationTasks, task...)
for _, historyEvents := range eventBatches {
task, err := ms.eventsToReplicationTask(transactionPolicy, [][]*historypb.HistoryEvent{historyEvents})
if err != nil {
}
}
replicationTasks = append(replicationTasks, ms.syncActivityToReplicationTask(transactionPolicy)...)
mutable_state_impl.go
replicationTasks = append(replicationTasks, ms.dirtyHSMToReplicationTask(transactionPolicy, eventBatches, clearBufferEvents)...)
archetypeID := ms.ChasmTree().ArchetypeID()
isWorkflow := archetypeID == chasm.WorkflowArchetypeID
if !isWorkflow && len(replicationTasks) != 0 {
return softassert.UnexpectedInternalErr(ms.logger, "chasm execution generated workflow replication tasks", nil)
}
switch transactionPolicy {
case historyi.TransactionPolicyActive:
}
len(ms.InsertTasks[tasks.CategoryReplication]) > 0 {
return softassert.UnexpectedInternalErr(
ms.logger,
func (ms *MutableStateImpl) syncActivityToReplicationTask(
transactionPolicy historyi.TransactionPolicy,
now := time.Now().UTC()
switch transactionPolicy {
case historyi.TransactionPolicyActive:
if ms.generateReplicationTask() {
eventBatches [][]*historypb.HistoryEvent,
clearBufferEvents bool,
switch transactionPolicy {
case historyi.TransactionPolicyActive:
if !ms.generateReplicationTask() {
func (ms *MutableStateImpl) closeTransactionHandleWorkflowResetTask(
transactionPolicy historyi.TransactionPolicy,
if transactionPolicy == historyi.TransactionPolicyPassive ||
!ms.IsWorkflowExecutionRunning() {
return nil
}
func (ms *MutableStateImpl) closeTransactionHandleActivityUserTimerTasks(
transactionPolicy historyi.TransactionPolicy,
switch transactionPolicy {
case historyi.TransactionPolicyActive:
if !ms.IsWorkflowExecutionRunning() {
// Any other task type is preserved in order.
// Eg: [START, UPSERT, TP1, CLOSE, TP2, TP3] -> [TP1, CLOSE, TP2, TP3]
func (ms *MutableStateImpl) closeTransactionCollapseVisibilityTasks() {
mutable_state_impl.go
visTasks := ms.InsertTasks[tasks.CategoryVisibility]
if len(visTasks) < 2 {
return
}
}
func (ms *MutableStateImpl) generateChecksum() *persistencespb.Checksum {
mutable_state_impl.go
if !ms.shouldGenerateChecksum() {
return nil
}
csum, err := generateMutableStateChecksum(ms)
if err != nil {
}
if ms.namespaceEntry == nil {
return false
}
return rand.Intn(100) < ms.config.MutableStateChecksumGenProbability(ms.namespaceEntry.Name().String())
mutable_state_impl.go
}