[Bug] SlidingWindowBatchWorkflowImpl.java recived signals are getting ignored if currentRecords is empty
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- java
- Domain
- distributed-systems
Research direction
Start at core/src/main/java/io/temporal/samples/batch/slidingwindow/SlidingWindowBatchWorkflowImpl.java around line 130 and inspect how received signals are handled when currentRecords is empty. Verify that the record ID is added to recordsToRemove and that Workflow.await can complete instead of waiting indefinitely.
Written by the indexing model from the issue text.
Description
What are you really trying to do?
Describe the bug
If signal is received when currentRecords is empty instead of null then it will not add it to recordsToRemove list which is causing Workflow.await(() -> currentRecords.size() == 0); to wait indefinite
https://github.com/temporalio/samples-java/blob/main/core/src/main/java/io/temporal/samples/batch/slidingwindow/SlidingWindowBatchWorkflowImpl.java#L130
Current Code
if (currentRecords == null) {
recordsToRemove.add(recordId);
return;
}
Expected change
if (currentRecords == null || currentRecords.isEmpty()) {
recordsToRemove.add(recordId);
return;
}
Minimal Reproduction
Environment/Versions
- OS and processor: [e.g. M1 Mac, x86 Windows, Linux]
- Temporal Version: [e.g. 1.14.0?] and/or SDK version
- Are you using Docker or Kubernetes or building Temporal from source?
Additional context
- Dominant language
- Java
- Stars
- 258
- Forks
- 189
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from temporalio/samples-java
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
temporalio/samples-java#770 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
temporalio/samples-java#749 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
temporalio/samples-java#687 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
temporalio/samples-java#635 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
temporalio/samples-java#606 · 4 reactions ·
All issues in temporalio/samples-java
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/rocketmq-dashboard#4860 · 1 comment ·
-
agent-audit bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Vault-Web/cloud-page#144 ·