Skip to content

Fix intermittent failure in DataStreamUpload#207

Merged
corbin-phipps merged 2 commits intofeature/dataStreamingfrom
user/corbinphipps/fix-upload-bug
Mar 4, 2024
Merged

Fix intermittent failure in DataStreamUpload#207
corbin-phipps merged 2 commits intofeature/dataStreamingfrom
user/corbinphipps/fix-upload-bug

Conversation

@corbin-phipps
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

Fixes an intermittent failure in the unit tests for DataStreamUpload where the number of data blocks received by the server was greater than the number of blocks sent.

This is because inside NextWrite(), m_numberOfDataBlocksToWrite was being decremented after the call to StartWrite(), but StartWrite() calls NextWrite(), which would sometimes use the old value of m_numberOfDataBlocksToWrite, thus writing additional data.

Technical Details

  • Moved decrement line to before call to StartWrite() in NextWrite() function for both client reactors DataStreamWriter and DataStreamReaderWriter.

Test Results

Ran DataStreamUpload API unit tests 20 times in a row, 100% pass. Other tests pass too.

Reviewer Focus

None.

Future Work

None.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@corbin-phipps corbin-phipps requested a review from a team as a code owner March 4, 2024 17:46
@corbin-phipps corbin-phipps merged commit 79e1f27 into feature/dataStreaming Mar 4, 2024
@corbin-phipps corbin-phipps deleted the user/corbinphipps/fix-upload-bug branch March 4, 2024 17:46
@abeltrano abeltrano mentioned this pull request Mar 5, 2024
10 tasks
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