-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flaky test TimerStartEventTest.shouldTriggerOnlyTwice #10169
Comments
Looking at these logs, we see that the 5th timer is CREATED. So the system works correctly, I don't expect a real bug. However, no TRIGGER command is written for it yet which is why the test fails. Perhaps the DueDateTimerChecker is causing issues here 🤔 |
Could be related to our recent scheduling changes 🤔 |
10170: Print record timestamp in compact record logger r=korthout a=korthout ## Description <!-- Please explain the changes you made here. --> When troubleshooting issues (or writing tests) for Timer related topics, we're often interested in both the Timer record's Duedate, as well as the actual time that the record was written, i.e. the record's Timestamp. This PR adds the Timestamp to the compact record logger when there are Timer records on the recorded log. While working on this, I also noticed that the compact record logger's Legend could be improved to only include Partition related info when the partition is actually printed as well (i.e. when there are multiple partitions). This is another PR in a series of QoL improvements I've recently made to the compact record logger. - #10156 - #10144 - #9885 ### Before ``` -------- [Partition] ['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] P[partitionId]K[key] - [summary of value] P9K999 - key; #999 - record position; "ID" element/process id; `@"elementid"/[P9K999]` - element with ID and key Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted. Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78' -------- C DPLY CREATE - #1->-1 -1 - E PROC CREATED - #2->#1 K1 - process.xml -> "process" (version:1) E TIME CREATED - #3->#1 K3 - `@"start_1"[-1]` in <process "K1"[?]> due T15:10:34.329 E DPLY CREATED - #4->#1 K2 - process.xml E DPLY FULLY_DISTRIBUTED - #5->#1 K2 - ``` ### After With Timer records: ``` -------- [Timestamp] ['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] K[key] - [summary of value] P9K999 - key; #999 - record position; "ID" element/process id; `@"elementid"/[P9K999]` - element with ID and key Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted. Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78' -------- 15:28:01 C DPLY CREATE - #1->-1 -1 - 15:28:02 E PROC CREATED - #2->#1 K1 - process.xml -> "process" (version:1) 15:28:02 E TIME CREATED - #3->#1 K3 - `@"start_1"[-1]` in <process "K1"[?]> due T15:28:03.087 15:28:02 E DPLY CREATED - #4->#1 K2 - process.xml 15:28:02 E DPLY FULLY_DISTRIBUTED - #5->#1 K2 - ``` Without Timer records: ``` -------- ['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] K[key] - [summary of value] P9K999 - key; #999 - record position; "ID" element/process id; `@"elementid"/[P9K999]` - element with ID and key Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted. Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78' -------- C DPLY CREATE - #1-> -1 -1 - E PROC CREATED - #2->#1 K01 - process.xml -> "process" (version:1) E DPLY CREATED - #3->#1 K02 - process.xml E DPLY FULLY_DISTRIBUTED - #4->#1 K02 - ``` When there are multiple partitions: ``` -------- [Partition] ['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] P[partitionId]K[key] - [summary of value] P9K999 - key; #999 - record position; "ID" element/process id; `@"elementid"/[P9K999]` - element with ID and key Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted. Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78' -------- 1 C DPLY CREATE - #1->-1 -1 - 1 E PROC CREATED - #2->#1 P1K1 - process.bpmn -> "shouldR..ecovery" (version:1) 1 E DPLY CREATED - #3->#1 P1K2 - process.bpmn 1 E DSTR DISTRIBUTING - #4->#1 P1K2 - on partition 2 1 E DSTR DISTRIBUTING - #5->#1 P1K2 - on partition 3 1 C DSTR COMPLETE - #6->-1 P1K2 - on partition 2 1 C DSTR COMPLETE - #7->-1 P1K2 - on partition 3 1 E DSTR COMPLETED - #8->#6 P1K2 - on partition 2 1 E DSTR COMPLETED - #9->#7 P1K2 - on partition 3 1 E DPLY FULLY_DISTRIBUTED - #10->#7 P1K2 - 2 C DPLY DISTRIBUTE - #1->-1 P1K2 - process.bpmn 2 E DPLY DISTRIBUTED - #2->#1 P1K2 - process.bpmn 3 C DPLY DISTRIBUTE - #1->-1 P1K2 - process.bpmn 3 E DPLY DISTRIBUTED - #2->#1 P1K2 - process.bpmn ``` ## Related issues <!-- Which issues are closed by this PR or are related --> relates to #10169 Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
It failed on main again as well two times, looks like easily reproducible https://camunda.slack.com/archives/C013MEVQ4M9/p1661353038445929 Would you mind to take a look @korthout ? |
Thanks for highlighting @Zelldon I can take a look into it after my current topic is completed :) Could you maybe point me to the specific scheduler changes that might affect this? Was there really a scheduler change or do you mean that the engine switches to a different way to schedule a repeating task? |
It was a change in the abstraction, that scheduled Tasks are only executed during Processing Phase and only if not in between ongoing processing, to avoid execution of tasks which might been scheduled during processing which want to access the database. |
Not sure but the tests seems to expect that the second model triggers three times:
This assert:
fails with:
Details``` 13:49:42.842 [Broker-0-LogStream-1] DEBUG io.camunda.zeebe.logstreams - Configured log appender back pressure at partition 1 as AppenderVegasCfg{initialLimit=1024, maxConcurrency=32768, alphaLimit=0.7, betaLimit=0.95}. Window limiting is disabled 13:49:42.897 [Broker-0-StreamProcessor-1] DEBUG io.camunda.zeebe.logstreams - Recovering state of partition 1 from snapshot 13:49:42.897 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@6a070fe5)), function-provider: io.camunda.zeebe.feel.impl.FeelFunctionProvider@64c0fcd5, clock: io.camunda.zeebe.el.impl.ZeebeFeelEngineClock@60ff6495, configuration: Configuration(false)] 13:49:42.907 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.logstreams - Recovered state of partition 1 from snapshot at position -1 13:49:42.908 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@25fdf6ee)), function-provider: io.camunda.zeebe.feel.impl.FeelFunctionProvider@77d7bd93, clock: io.camunda.zeebe.el.impl.ZeebeFeelEngineClock@1412d1e8, configuration: Configuration(false)] 13:49:42.909 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@fd2c433)), function-provider: io.camunda.zeebe.feel.impl.FeelFunctionProvider@45d209a1, clock: io.camunda.zeebe.el.impl.ZeebeFeelEngineClock@fa31fad, configuration: Configuration(false)] 13:49:42.910 [Broker-0-StreamProcessor-1] INFO org.camunda.dmn.DmnEngine - DMN-Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@1a85ee25)), function-provider: org.camunda.feel.context.FunctionProvider$EmptyFunctionProvider$@780ed8a8, audit-loggers: List(), configuration: Configuration(false,false,false)] 13:49:42.910 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.dmn.NoUnpackValueMapper@3abfd797)), function-provider: org.camunda.feel.context.FunctionProvider$EmptyFunctionProvider$@780ed8a8, clock: SystemClock, configuration: Configuration(false)] 13:49:42.911 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@441d55b2)), function-provider: io.camunda.zeebe.feel.impl.FeelFunctionProvider@56bcd2ce, clock: io.camunda.zeebe.el.impl.ZeebeFeelEngineClock@637deafa, configuration: Configuration(false)] 13:49:42.912 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@27ba8a6d)), function-provider: io.camunda.zeebe.feel.impl.FeelFunctionProvider@9a4ebed, clock: io.camunda.zeebe.el.impl.ZeebeFeelEngineClock@393e62b5, configuration: Configuration(false)] 13:49:42.914 [Broker-0-StreamProcessor-1] INFO org.camunda.dmn.DmnEngine - DMN-Engine created. [value-mapper: CompositeValueMapper(List(io.camunda.zeebe.feel.impl.MessagePackValueMapper@1e6f4bc)), function-provider: org.camunda.feel.context.FunctionProvider$EmptyFunctionProvider$@780ed8a8, audit-loggers: List(), configuration: Configuration(false,false,false)] 13:49:42.914 [Broker-0-StreamProcessor-1] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.dmn.NoUnpackValueMapper@5127ed58)), function-provider: org.camunda.feel.context.FunctionProvider$EmptyFunctionProvider$@780ed8a8, clock: SystemClock, configuration: Configuration(false)] 13:49:42.915 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.processor - Processor starts replay of events. [snapshot-position: -1, replay-mode: PROCESSING] 13:49:42.916 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.processor - Processor finished replay, with [lastProcessedPosition: -1, lastWrittenPosition: -1] 13:49:42.916 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.engine.state.migration - Starting processing of migration tasks (use LogLevel.DEBUG for more details) ... 13:49:42.916 [Broker-0-StreamProcessor-1] DEBUG io.camunda.zeebe.engine.state.migration - Found 3 migration tasks: ProcessMessageSubscriptionSentTimeMigration, MessageSubscriptionSentTimeMigration, TemporaryVariableMigration 13:49:42.916 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.engine.state.migration - Skipping ProcessMessageSubscriptionSentTimeMigration migration (1/3). It was determined it does not need to run right now. 13:49:42.916 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.engine.state.migration - Skipping MessageSubscriptionSentTimeMigration migration (2/3). It was determined it does not need to run right now. 13:49:42.917 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.engine.state.migration - Skipping TemporaryVariableMigration migration (3/3). It was determined it does not need to run right now. 13:49:42.917 [Broker-0-StreamProcessor-1] INFO io.camunda.zeebe.engine.state.migration - Completed processing of migration tasks (use LogLevel.DEBUG for more details) ... 13:49:42.917 [Broker-0-StreamProcessor-1] DEBUG io.camunda.zeebe.engine.state.migration - Executed 0 migration tasks: 13:49:48.073 [] INFO io.camunda.zeebe.test - Test failed, following records were exported: 13:49:48.248 [] INFO io.camunda.zeebe.test - Compact log representation: -------- [Timestamp] ['C'ommand/'E'event/'R'ejection] [valueType] [intent] - #[position]->#[source record position] K[key] - [summary of value] P9K999 - key; #999 - record position; "ID" element/process id; @"elementid"/[P9K999] - element with ID and key Keys are decomposed into partition id and per partition key (e.g. 2251799813685253 -> P1K005). If single partition, the partition is omitted. Long IDs are shortened (e.g. 'startEvent_5d56488e-0570-416c-ba2d-36d2a3acea78' -> 'star..acea78' -------- 13:49:42 C DPLY CREATE - #1-> -1 -1 - 13:49:42 E PROC CREATED - #2->#1 K001 - process.xml -> "process_1" (version:1) 13:49:42 E TIME CREATED - #3->#1 K003 - @"start_1"[ -1] in due T13:49:52.9172 reps 13:49:42 E DPLY CREATED - #4->#1 K002 - process.xml 13:49:42 E DPLY FULLY_DISTRIBUTED - #5->#1 K002 - 13:49:42 C DPLY CREATE - #6-> -1 -1 - 13:49:42 E PROC CREATED - #7->#6 K004 - process.xml -> "process_2" (version:1) 13:49:42 E TIME CREATED - #8->#6 K006 - @"start_2"[ -1] in due T13:49:52.9173 reps 13:49:42 E DPLY CREATED - #9->#6 K005 - process.xml 13:49:42 E DPLY FULLY_DISTRIBUTED - #10->#6 K005 - 13:49:58 C TIME TRIGGER - #11-> -1 K003 - @"start_1"[ -1] in due T13:49:52.9172 reps 13:49:58 C TIME TRIGGER - #12-> -1 K006 - @"start_2"[ -1] in due T13:49:52.9173 reps 13:49:58 E TIME TRIGGERED - #13->#11 K003 - @"start_1"[ -1] in due T13:49:52.9172 reps 13:49:58 E PROC_EVNT TRIGGERING - #14->#11 K008 - @"start_1"[K001] in (no vars) 13:49:58 C PI ACTIVATE - #15->#11 K007 - PROCESS "process_1" in 13:49:58 E TIME CREATED - #16->#11 K009 - @"start_1"[ -1] in due T13:50:02.917 13:49:58 C TIME TRIGGER - #17-> -1 K006 - @"start_2"[ -1] in due T13:49:52.9173 reps 13:49:58 E TIME TRIGGERED - #18->#12 K006 - @"start_2"[ -1] in due T13:49:52.9173 reps 13:49:58 E PROC_EVNT TRIGGERING - #19->#12 K011 - @"start_2"[K004] in (no vars) 13:49:58 C PI ACTIVATE - #20->#12 K010 - PROCESS "process_2" in 13:49:58 E TIME CREATED - #21->#12 K012 - @"start_2"[ -1] in due T13:50:02.9172 reps 13:50:03 C TIME TRIGGER - #22-> -1 K009 - @"start_1"[ -1] in due T13:50:02.917 13:50:03 C TIME TRIGGER - #23-> -1 K012 - @"start_2"[ -1] in due T13:50:02.9172 reps 13:50:03 E PI ACTIVATING - #24->#15 K007 - PROCESS "process_1" in 13:50:03 E PI ACTIVATED - #25->#15 K007 - PROCESS "process_1" in 13:50:03 E PROC_EVNT TRIGGERED - #26->#15 K008 - @"start_1"[K001] in (no vars) 13:50:03 E PI ACTIVATING - #27->#15 K013 - START_EVENT "start_1" in 13:50:03 E PI ACTIVATED - #28->#15 K013 - START_EVENT "start_1" in 13:50:03 C PI COMPLETE - #29->#15 K013 - START_EVENT "start_1" in 13:50:03 R TIME TRIGGER - #30->#17 K006 - @"start_2"[ -1] in due T13:49:52.9173 reps !NOT_FOUND (Expected to trigger timer with key '2251799813685254', but no such timer was found) 13:50:03 C TIME TRIGGER - #31-> -1 K009 - @"start_1"[ -1] in due T13:50:02.917 13:50:03 C TIME TRIGGER - #32-> -1 K012 - @"start_2"[ -1] in due T13:50:02.9172 reps 13:50:03 E PI ACTIVATING - #33->#20 K010 - PROCESS "process_2" in 13:50:03 E PI ACTIVATED - #34->#20 K010 - PROCESS "process_2" in 13:50:03 E PROC_EVNT TRIGGERED - #35->#20 K011 - @"start_2"[K004] in (no vars) 13:50:03 E PI ACTIVATING - #36->#20 K014 - START_EVENT "start_2" in 13:50:03 E PI ACTIVATED - #37->#20 K014 - START_EVENT "start_2" in 13:50:03 C PI COMPLETE - #38->#20 K014 - START_EVENT "start_2" in 13:50:03 E TIME TRIGGERED - #39->#22 K009 - @"start_1"[ -1] in due T13:50:02.917 13:50:03 E PROC_EVNT TRIGGERING - #40->#22 K016 - @"start_1"[K001] in (no vars) 13:50:03 C PI ACTIVATE - #41->#22 K015 - PROCESS "process_1" in 13:50:03 E TIME TRIGGERED - #42->#23 K012 - @"start_2"[ -1] in due T13:50:02.9172 reps 13:50:03 E PROC_EVNT TRIGGERING - #43->#23 K018 - @"start_2"[K004] in (no vars) 13:50:03 C PI ACTIVATE - #44->#23 K017 - PROCESS "process_2" in 13:50:03 E TIME CREATED - #45->#23 K019 - @"start_2"[ -1] in due T13:50:12.917 13:50:13 E PI COMPLETING - #46->#29 K013 - START_EVENT "start_1" in 13:50:13 E PI COMPLETED - #47->#29 K013 - START_EVENT "start_1" in 13:50:13 E PI SEQ_FLOW_TAKEN - #48->#29 K020 - SEQUENCE_FLOW "sequenc..549f327" in 13:50:13 C PI ACTIVATE - #49->#29 K021 - END_EVENT "end_1" in 13:50:13 R TIME TRIGGER - #50->#31 K009 - @"start_1"[ -1] in due T13:50:02.917 !NOT_FOUND (Expected to trigger timer with key '2251799813685257', but no such timer was found) 13:50:13 R TIME TRIGGER - #51->#32 K012 - @"start_2"[ -1] in due T13:50:02.9172 reps !NOT_FOUND (Expected to trigger timer with key '2251799813685260', but no such timer was found) 13:50:13 E PI COMPLETING - #52->#38 K014 - START_EVENT "start_2" in 13:50:13 E PI COMPLETED - #53->#38 K014 - START_EVENT "start_2" in 13:50:13 E PI SEQ_FLOW_TAKEN - #54->#38 K022 - SEQUENCE_FLOW "sequenc..4c33552" in 13:50:13 C PI ACTIVATE - #55->#38 K023 - END_EVENT "end_2" in 13:50:13 E PI ACTIVATING - #56->#41 K015 - PROCESS "process_1" in 13:50:13 E PI ACTIVATED - #57->#41 K015 - PROCESS "process_1" in 13:50:13 E PROC_EVNT TRIGGERED - #58->#41 K016 - @"start_1"[K001] in (no vars) 13:50:13 E PI ACTIVATING - #59->#41 K024 - START_EVENT "start_1" in 13:50:13 E PI ACTIVATED - #60->#41 K024 - START_EVENT "start_1" in 13:50:13 C PI COMPLETE - #61->#41 K024 - START_EVENT "start_1" in 13:50:13 E PI ACTIVATING - #62->#44 K017 - PROCESS "process_2" in 13:50:13 E PI ACTIVATED - #63->#44 K017 - PROCESS "process_2" in 13:50:13 E PROC_EVNT TRIGGERED - #64->#44 K018 - @"start_2"[K004] in (no vars) 13:50:13 E PI ACTIVATING - #65->#44 K025 - START_EVENT "start_2" in 13:50:13 E PI ACTIVATED - #66->#44 K025 - START_EVENT "start_2" in 13:50:13 C PI COMPLETE - #67->#44 K025 - START_EVENT "start_2" in 13:50:13 E PI ACTIVATING - #68->#49 K021 - END_EVENT "end_1" in 13:50:13 E PI ACTIVATED - #69->#49 K021 - END_EVENT "end_1" in 13:50:13 E PI COMPLETING - #70->#49 K021 - END_EVENT "end_1" in 13:50:13 E PI COMPLETED - #71->#49 K021 - END_EVENT "end_1" in 13:50:13 C PI COMPLETE - #72->#49 K007 - PROCESS "process_1" in 13:50:13 E PI ACTIVATING - #73->#55 K023 - END_EVENT "end_2" in 13:50:13 E PI ACTIVATED - #74->#55 K023 - END_EVENT "end_2" in 13:50:13 E PI COMPLETING - #75->#55 K023 - END_EVENT "end_2" in 13:50:13 E PI COMPLETED - #76->#55 K023 - END_EVENT "end_2" in 13:50:13 C PI COMPLETE - #77->#55 K010 - PROCESS "process_2" in 13:50:13 E PI COMPLETING - #78->#61 K024 - START_EVENT "start_1" in 13:50:13 E PI COMPLETED - #79->#61 K024 - START_EVENT "start_1" in 13:50:13 E PI SEQ_FLOW_TAKEN - #80->#61 K026 - SEQUENCE_FLOW "sequenc..549f327" in 13:50:13 C PI ACTIVATE - #81->#61 K027 - END_EVENT "end_1" in 13:50:13 E PI COMPLETING - #82->#67 K025 - START_EVENT "start_2" in 13:50:13 E PI COMPLETED - #83->#67 K025 - START_EVENT "start_2" in 13:50:13 E PI SEQ_FLOW_TAKEN - #84->#67 K028 - SEQUENCE_FLOW "sequenc..4c33552" in 13:50:13 C PI ACTIVATE - #85->#67 K029 - END_EVENT "end_2" in 13:50:13 E PI COMPLETING - #86->#72 K007 - PROCESS "process_1" in 13:50:13 E PI COMPLETED - #87->#72 K007 - PROCESS "process_1" in 13:50:13 E PI COMPLETING - #88->#77 K010 - PROCESS "process_2" in 13:50:13 E PI COMPLETED - #89->#77 K010 - PROCESS "process_2" in 13:50:13 E PI ACTIVATING - #90->#81 K027 - END_EVENT "end_1" in 13:50:13 E PI ACTIVATED - #91->#81 K027 - END_EVENT "end_1" in 13:50:13 E PI COMPLETING - #92->#81 K027 - END_EVENT "end_1" in 13:50:13 E PI COMPLETED - #93->#81 K027 - END_EVENT "end_1" in 13:50:13 C PI COMPLETE - #94->#81 K015 - PROCESS "process_1" in 13:50:13 E PI ACTIVATING - #95->#85 K029 - END_EVENT "end_2" in 13:50:13 E PI ACTIVATED - #96->#85 K029 - END_EVENT "end_2" in 13:50:13 E PI COMPLETING - #97->#85 K029 - END_EVENT "end_2" in 13:50:13 E PI COMPLETED - #98->#85 K029 - END_EVENT "end_2" in 13:50:13 C PI COMPLETE - #99->#85 K017 - PROCESS "process_2" in 13:50:13 E PI COMPLETING - #100->#94 K015 - PROCESS "process_1" in 13:50:13 E PI COMPLETED - #101->#94 K015 - PROCESS "process_1" in 13:50:13 E PI COMPLETING - #102->#99 K017 - PROCESS "process_2" in 13:50:13 E PI COMPLETED - #103->#99 K017 - PROCESS "process_2" in-------------- Deployed Processes ---------------------- process.xml -> "process_2" (version:1)[K004] ------ sequenceFlow_fde20e38-fe7a-4be3-818a-d11524c33552 R3/2022-08-25T13:49:52.917+02:00[Europe/Berlin]/PT10S sequenceFlow_fde20e38-fe7a-4be3-818a-d11524c33552--------------- Decomposed keys (for debugging) ----------------- 13:49:48.250 [] DEBUG io.camunda.zeebe.broker.logstreams - Close stream processor java.lang.AssertionError:
|
Occurred again, with a likely explanation provided by @korthout: #17254 (comment) See: https://github.com/camunda/zeebe/actions/runs/8970247080/job/24633352874 |
## Description Unflake tests that rely on time travel to trigger timers. This was unstable because the due date checker was scheduled with a delay, which is used to determine an actual deadline later during the actor's scheduling of the TimerSubscription. The instability arose because the task can be scheduled async, which means that the deadline was calculated async as well, so it could happen that the deadline was determined after the test had already traveled through time. This problem is resolved by introducing a new `runAt` method, which allows scheduling a task at a specific timestamp. When the async scheduling is postponed until after the time traveling, the task will trigger immediately if the timestamp is now in the past. This changes the following modules: - `schedule` introduces a new `runAt` method that can schedule Timer tasks (TimerSubscription) by timestamp - `stream-platform` introduces a new `runAt` method for the engine to schedule tasks at a timestamp that can produce processing results - `engine` uses the new `runAt` method to (re)schedule the DueDateChecker ## Related issues closes #17254 closes #10169 closes #18462
Summary
Failures
Example assertion failure
Hypotheses
The test is based on seconds. If the test takes longer than those few seconds it could break.
Logs
The following logs are from a local reproduction, as the CI didn't show the actual logs.
I was able to reproduce it locally by pinning the Engine clock's time at the start of test and then running the test repeatedly until failure.
Logs from local reproduction
The text was updated successfully, but these errors were encountered: