Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: #251
All cases use simple pipeline and JetStream isbsvc
Test on main branch when disabling daemon service
initial state: in(1) cat(1) out(1)
![image](https://user-images.githubusercontent.com/19543684/198011305-362f2290-3f7f-4218-bbd0-bba3d148d2fe.png)
![image](https://user-images.githubusercontent.com/19543684/198011458-2fcc8756-487c-4de3-9a35-12782fa23d33.png)
![image](https://user-images.githubusercontent.com/19543684/198011562-1780b561-ef1d-49f0-af4a-a6e46dd65a28.png)
![image](https://user-images.githubusercontent.com/19543684/198011666-cc8d1eef-5ea0-4ac3-ae2c-05136109cb62.png)
scale down: in(0) cat(0) out(0)
scale up: in(1) cat(1) out(1)
scale up: in(2) cat(2) out(2)
Based on above observation, I assume the regular pods in the vertex are working as expected.
Test on this branch with the fix
Explanation: When a processor exits, we keep the offsetTimeline until all the offset in the offsetTimeline are outdated, and then delete the processor from the processor manager. This operation is executed in the "GetWatermark" function. However, in the UX, we only use GetHeadWatermark function, so the exited processor never gets deleted in the processor manager of the daemon service. When we scale up again and add back the processor, because we only check on
processor is nil
, the new coming back processor is not added back properly to the processor manager. Hence, the watcher is lost for the coming back processor, and the watermark in the UI stops updating.Actual test:
initial state: in(1) cat(1) out(1)
![image](https://user-images.githubusercontent.com/19543684/198013087-37dce605-fcd0-471d-a48d-de5cea64f372.png)
scale down: in(0) cat(0) out(0)![image](https://user-images.githubusercontent.com/19543684/198013125-df5f6c64-e4c2-4989-aa2d-4be0b71785de.png)
scale up: in(1) cat(1) out(1)NOTE
Failed to reproduce the
KV_simple-pipeline-default-simple-pipeline-in_SOURCE_OT
keeps zero issue locally.