Skip to content

refactor(map): Fix null results, abstract completion logic#242

Open
ayushiahjolia wants to merge 1 commit intomainfrom
map_refactor
Open

refactor(map): Fix null results, abstract completion logic#242
ayushiahjolia wants to merge 1 commit intomainfrom
map_refactor

Conversation

@ayushiahjolia
Copy link
Contributor

@ayushiahjolia ayushiahjolia commented Mar 20, 2026

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#39

Description

  • Fix NPE in ChildContextOperation.checkpointSuccess when map iterations return null by adding a null guard on the serialized payload before calling getBytes().
  • Make canComplete() and validateItemCount() abstract in ConcurrencyOperation so Map and Parallel each own their completion semantics. Move Parallel-specific logic (fail-fast on any failure when minSuccessful == -1) into ParallelOperation. - Remove unused minSuccessful/toleratedFailureCount/failureRateThreshold fields from the base class.
  • Remove dead runUntilCompleteOrSuspend stub from BaseDurableOperationTest.
  • Add testMapWithNullResults integration test.
  • Update design.md with ConcurrencyOperation, MapOperation, ParallelOperation, and ChildContextOperation in the architecture diagram and package structure.

Demo/Screenshots

N/A

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? Updated required tests.

Integration Tests

Have integration tests been written for these changes? Added missing tests.

Examples

Has a new example been added for the change? (if applicable) N/A

@ayushiahjolia ayushiahjolia marked this pull request as ready for review March 20, 2026 04:44
@ayushiahjolia ayushiahjolia requested a review from a team March 20, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant