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VEFTS19OT1RfRk9VTkQQBhIVChFVTkhBTkRMRURfQ09NTUFORBAHEgkK" ,
152+ "BUZBVEFMEAgSHwobUEFHSU5BVElPTl9PUl9ISVNUT1JZX0ZFVENIEAlCLuoC" ,
153+ "K1RlbXBvcmFsaW86OkJyaWRnZTo6QXBpOjpXb3JrZmxvd0FjdGl2YXRpb25i" ,
154+ "BnByb3RvMw==" ) ) ;
154155 descriptor = pbr ::FileDescriptor . FromGeneratedCode ( descriptorData ,
155156 new pbr ::FileDescriptor [ ] { global ::Google . Protobuf . WellKnownTypes . TimestampReflection . Descriptor , global ::Google . Protobuf . WellKnownTypes . DurationReflection . Descriptor , global ::Temporalio . Api . Failure . V1 . MessageReflection . Descriptor , global ::Temporalio . Api . Update . V1 . MessageReflection . Descriptor , global ::Temporalio . Api . Common . V1 . MessageReflection . Descriptor , global ::Temporalio . Api . Enums . V1 . WorkflowReflection . Descriptor , global ::Temporalio . Bridge . Api . ActivityResult . ActivityResultReflection . Descriptor , global ::Temporalio . Bridge . Api . ChildWorkflow . ChildWorkflowReflection . Descriptor , global ::Temporalio . Bridge . Api . Common . CommonReflection . Descriptor , } ,
156157 new pbr ::GeneratedClrTypeInfo ( null , null , new pbr ::GeneratedClrTypeInfo [ ] {
157158 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . WorkflowActivation ) , global ::Temporalio . Bridge . Api . WorkflowActivation . WorkflowActivation . Parser , new [ ] { "RunId" , "Timestamp" , "IsReplaying" , "HistoryLength" , "Jobs" , "AvailableInternalFlags" , "HistorySizeBytes" , "ContinueAsNewSuggested" , "BuildIdForCurrentTask" } , null , null , null , null ) ,
158159 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . WorkflowActivationJob ) , global ::Temporalio . Bridge . Api . WorkflowActivation . WorkflowActivationJob . Parser , new [ ] { "StartWorkflow" , "FireTimer" , "UpdateRandomSeed" , "QueryWorkflow" , "CancelWorkflow" , "SignalWorkflow" , "ResolveActivity" , "NotifyHasPatch" , "ResolveChildWorkflowExecutionStart" , "ResolveChildWorkflowExecution" , "ResolveSignalExternalWorkflow" , "ResolveRequestCancelExternalWorkflow" , "DoUpdate" , "RemoveFromCache" } , new [ ] { "Variant" } , null , null , null ) ,
159160 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . StartWorkflow ) , global ::Temporalio . Bridge . Api . WorkflowActivation . StartWorkflow . Parser , new [ ] { "WorkflowType" , "WorkflowId" , "Arguments" , "RandomnessSeed" , "Headers" , "Identity" , "ParentWorkflowInfo" , "WorkflowExecutionTimeout" , "WorkflowRunTimeout" , "WorkflowTaskTimeout" , "ContinuedFromExecutionRunId" , "ContinuedInitiator" , "ContinuedFailure" , "LastCompletionResult" , "FirstExecutionRunId" , "RetryPolicy" , "Attempt" , "CronSchedule" , "WorkflowExecutionExpirationTime" , "CronScheduleToScheduleInterval" , "Memo" , "SearchAttributes" , "StartTime" } , null , null , null , new pbr ::GeneratedClrTypeInfo [ ] { null , } ) ,
160161 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . FireTimer ) , global ::Temporalio . Bridge . Api . WorkflowActivation . FireTimer . Parser , new [ ] { "Seq" } , null , null , null , null ) ,
161- new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveActivity ) , global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveActivity . Parser , new [ ] { "Seq" , "Result" } , null , null , null , null ) ,
162+ new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveActivity ) , global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveActivity . Parser , new [ ] { "Seq" , "Result" , "IsLocal" } , null , null , null , null ) ,
162163 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStart ) , global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStart . Parser , new [ ] { "Seq" , "Succeeded" , "Failed" , "Cancelled" } , new [ ] { "Status" } , null , null , null ) ,
163164 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStartSuccess ) , global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStartSuccess . Parser , new [ ] { "RunId" } , null , null , null , null ) ,
164165 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStartFailure ) , global ::Temporalio . Bridge . Api . WorkflowActivation . ResolveChildWorkflowExecutionStartFailure . Parser , new [ ] { "WorkflowId" , "WorkflowType" , "Cause" } , null , null , null , null ) ,
@@ -186,22 +187,37 @@ static WorkflowActivationReflection() {
186187 /// ## Job ordering guarantees and semantics
187188 ///
188189 /// Core will, by default, order jobs within the activation as follows:
189- /// `patches -> signals/updates -> other -> queries -> evictions`
190+ /// 1. patches
191+ /// 2. random-seed-updates
192+ /// 3. signals/updates
193+ /// 4. all others
194+ /// 5. local activity resolutions
195+ /// 6. queries
196+ /// 7. evictions
190197 ///
191198 /// This is because:
192199 /// * Patches are expected to apply to the entire activation
193200 /// * Signal and update handlers should be invoked before workflow routines are iterated. That is to
194201 /// say before the users' main workflow function and anything spawned by it is allowed to continue.
202+ /// * Local activities resolutions go after other normal jobs because while *not* replaying, they
203+ /// will always take longer than anything else that produces an immediate job (which is
204+ /// effectively instant). When *replaying* we need to scan ahead for LA markers so that we can
205+ /// resolve them in the same activation that they completed in when not replaying. However, doing
206+ /// so would, by default, put those resolutions *before* any other immediate jobs that happened
207+ /// in that same activation (prime example: cancelling not-wait-for-cancel activities). So, we do
208+ /// this to ensure the LA resolution happens after that cancel (or whatever else it may be) as it
209+ /// normally would have when executing.
195210 /// * Queries always go last (and, in fact, always come in their own activation)
196211 /// * Evictions also always come in their own activation
197212 ///
198- /// The downside of this reordering is that a signal or update handler may not observe that some
199- /// other event had already happened (ex: an activity completed) when it is first invoked, though it
200- /// will subsequently when workflow routines are driven. Core only does this reordering to make life
201- /// easier for languages that cannot explicitly control when workflow routines are iterated.
202- /// Languages that can explicitly control such iteration should prefer to apply all the jobs to state
203- /// (by resolving promises/futures, invoking handlers, etc as they iterate over the jobs) and then
204- /// only *after* that is done, drive the workflow routines.
213+ /// Core does this reordering to ensure that langs observe jobs in the same order during replay as
214+ /// they would have during execution. However, in principle, this ordering is not necessary
215+ /// (excepting queries/evictions, which definitely must come last) if lang layers apply all jobs to
216+ /// state *first* (by resolving promises/futures, marking handlers to be invoked, etc as they iterate
217+ /// over the jobs) and then only *after* that is done, drive coroutines/threads/whatever. If
218+ /// execution works this way, then determinism is only impacted by the order routines are driven in
219+ /// (which must be stable based on lang implementation or convention), rather than the order jobs are
220+ /// processed.
205221 ///
206222 /// ## Evictions
207223 ///
@@ -3083,6 +3099,7 @@ public ResolveActivity() {
30833099 public ResolveActivity ( ResolveActivity other ) : this ( ) {
30843100 seq_ = other . seq_ ;
30853101 result_ = other . result_ != null ? other . result_ . Clone ( ) : null ;
3102+ isLocal_ = other . isLocal_ ;
30863103 _unknownFields = pb ::UnknownFieldSet . Clone ( other . _unknownFields ) ;
30873104 }
30883105
@@ -3119,6 +3136,22 @@ public uint Seq {
31193136 }
31203137 }
31213138
3139+ /// <summary>Field number for the "is_local" field.</summary>
3140+ public const int IsLocalFieldNumber = 3 ;
3141+ private bool isLocal_ ;
3142+ /// <summary>
3143+ /// Set to true if the resolution is for a local activity. This is used internally by Core and
3144+ /// lang does not need to care about it.
3145+ /// </summary>
3146+ [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
3147+ [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
3148+ public bool IsLocal {
3149+ get { return isLocal_ ; }
3150+ set {
3151+ isLocal_ = value ;
3152+ }
3153+ }
3154+
31223155 [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
31233156 [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
31243157 public override bool Equals ( object other ) {
@@ -3136,6 +3169,7 @@ public bool Equals(ResolveActivity other) {
31363169 }
31373170 if ( Seq != other . Seq ) return false ;
31383171 if ( ! object . Equals ( Result , other . Result ) ) return false ;
3172+ if ( IsLocal != other . IsLocal ) return false ;
31393173 return Equals ( _unknownFields , other . _unknownFields ) ;
31403174 }
31413175
@@ -3145,6 +3179,7 @@ public override int GetHashCode() {
31453179 int hash = 1 ;
31463180 if ( Seq != 0 ) hash ^= Seq . GetHashCode ( ) ;
31473181 if ( result_ != null ) hash ^= Result . GetHashCode ( ) ;
3182+ if ( IsLocal != false ) hash ^= IsLocal . GetHashCode ( ) ;
31483183 if ( _unknownFields != null ) {
31493184 hash ^= _unknownFields . GetHashCode ( ) ;
31503185 }
@@ -3171,6 +3206,10 @@ public void WriteTo(pb::CodedOutputStream output) {
31713206 output . WriteRawTag ( 18 ) ;
31723207 output . WriteMessage ( Result ) ;
31733208 }
3209+ if ( IsLocal != false ) {
3210+ output . WriteRawTag ( 24 ) ;
3211+ output . WriteBool ( IsLocal ) ;
3212+ }
31743213 if ( _unknownFields != null ) {
31753214 _unknownFields . WriteTo ( output ) ;
31763215 }
@@ -3189,6 +3228,10 @@ public void WriteTo(pb::CodedOutputStream output) {
31893228 output . WriteRawTag ( 18 ) ;
31903229 output . WriteMessage ( Result ) ;
31913230 }
3231+ if ( IsLocal != false ) {
3232+ output . WriteRawTag ( 24 ) ;
3233+ output . WriteBool ( IsLocal ) ;
3234+ }
31923235 if ( _unknownFields != null ) {
31933236 _unknownFields . WriteTo ( ref output ) ;
31943237 }
@@ -3205,6 +3248,9 @@ public int CalculateSize() {
32053248 if ( result_ != null ) {
32063249 size += 1 + pb ::CodedOutputStream . ComputeMessageSize ( Result ) ;
32073250 }
3251+ if ( IsLocal != false ) {
3252+ size += 1 + 1 ;
3253+ }
32083254 if ( _unknownFields != null ) {
32093255 size += _unknownFields . CalculateSize ( ) ;
32103256 }
@@ -3226,6 +3272,9 @@ public void MergeFrom(ResolveActivity other) {
32263272 }
32273273 Result . MergeFrom ( other . Result ) ;
32283274 }
3275+ if ( other . IsLocal != false ) {
3276+ IsLocal = other . IsLocal ;
3277+ }
32293278 _unknownFields = pb ::UnknownFieldSet . MergeFrom ( _unknownFields , other . _unknownFields ) ;
32303279 }
32313280
@@ -3252,6 +3301,10 @@ public void MergeFrom(pb::CodedInputStream input) {
32523301 input . ReadMessage ( Result ) ;
32533302 break ;
32543303 }
3304+ case 24 : {
3305+ IsLocal = input . ReadBool ( ) ;
3306+ break ;
3307+ }
32553308 }
32563309 }
32573310 #endif
@@ -3278,6 +3331,10 @@ public void MergeFrom(pb::CodedInputStream input) {
32783331 input . ReadMessage ( Result ) ;
32793332 break ;
32803333 }
3334+ case 24 : {
3335+ IsLocal = input . ReadBool ( ) ;
3336+ break ;
3337+ }
32813338 }
32823339 }
32833340 }
0 commit comments