• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence-java-client / 2409
80%

Build:
DEFAULT BRANCH: master
Ran 05 Jul 2024 12:23AM CUT
Jobs 1
Files 274
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2024 08:33PM CUT coverage: 61.467% (-0.05%) from 61.518%
2409

push

buildkite

web-flow
Avoid consuming ByteBuffers (#913)

A ByteBuffer is a pointer to a byte[] with a starting position, a current position, and a limit. Any function that reads from its contents updates the current position. Both TracingPropagator and WorkflowUtils copy the entirety of its contents, and in doing so they mutate the current position. WorkflowUtils resets it afterwards but this still isn't thread-safe as another thread may be trying to read it.

By duplicating the ByteBuffer (copying only the metadata, not the actual contents) we avoid modifying it. It doesn't seem likely that there's real impact in either of these cases beyond unit tests, where these ByteBuffers stick around in the workflow history and are repeatedly serialized/deserialized. Modifying them during serialization can create test flakiness as that can trigger exceptions.

2 of 2 new or added lines in 2 files covered. (100.0%)

10 existing lines in 4 files now uncovered.

11972 of 19477 relevant lines covered (61.47%)

0.61 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
81.58
-0.88% src/main/java/com/uber/cadence/internal/sync/WorkflowThreadContext.java
1
92.65
-1.47% src/main/java/com/uber/cadence/internal/sync/CancellationScopeImpl.java
3
61.18
-3.53% src/main/java/com/uber/cadence/internal/replay/DecisionStateMachineBase.java
5
89.72
-4.67% src/main/java/com/uber/cadence/internal/replay/ActivityDecisionContext.java
Jobs
ID Job ID Ran Files Coverage
1 2409.1 05 Jul 2024 12:23AM CUT 274
61.47
Source Files on build 2409
  • Tree
  • List 274
  • Changed 7
  • Source Changed 2
  • Coverage Changed 6
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
0.0
...e/internal/compatibility/thrift/HistoryMapper.java1179 706 0 706 0.0
0.0
...uber/cadence/client/WorkflowNotFoundException.java33 2 0 2 0.0
0.0
...nce/internal/compatibility/thrift/ErrorMapper.java114 33 0 33 0.0
0.0
...e/internal/compatibility/proto/DecisionMapper.java274 155 0 155 0.0
0.0
...nce/client/ActivityCompletionFailureException.java36 6 0 6 0.0
0.0
...ber/cadence/client/ActivityNotExistsException.java39 6 0 6 0.0
0.0
...l/common/TerminateWorkflowExecutionParameters.java78 21 0 21 0.0
0.0
...ence/client/WorkflowAlreadyCompletedException.java33 2 0 2 0.0
0.0
...er/cadence/client/WorkflowTerminatedException.java49 6 0 6 0.0
0.0
...va/com/uber/cadence/internal/errors/ErrorType.java20 1 0 1 0.0
Showing 1 to 10 of 274 entries
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 28
  • Next
  • ►
    61.47
    src/
  • Back to Repo
  • Build #2409
  • 153df859 on github
  • Prev Build on master (#2406)
  • Next Build on master (#2410)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc