Skip to content

Conversation

@MIchaelMainer
Copy link
Collaborator

@MIchaelMainer MIchaelMainer commented Aug 2, 2019

Changes proposed in this pull request

  • Move PageIterator from Core library to the service library. When we moved from a single repo to to, the PageIterator was left in the core and the tests moved to the service library. This completes the refactor.
  • Remove the mutual recursion that caused stackoverflow exception and replace it with a loop based on nextLink. Fixes PageIterator StackoverflowException on large dataset msgraph-sdk-dotnet-core#16
  • Fix issue with adding items to the processing queue.

Merge gates

  • Remove PageIterator from Microsoft.Graph.Core and publish Microsoft.Graph.Core to NuGet. We need this so we can make the following changes before building.
  • Change the PageIterator namespace to Microsoft.Graph from Microsoft.Graph.Tasks. We had to do this during development as the Core library has the PageIterator in the published NuGet and we'd have a name collision.
  • Remove the Microsoft.Graph.Tasks alias from PageIteratorTests.cs. This was done to disambiguate the PageIterator (see previous point).
  • Increment version.

Post publication

  • Integrate these verified changes to the beta client library.

On branch mm/movePageIterator
Changes to be committed:
 modified:   src/Microsoft.Graph/Microsoft.Graph.csproj

 Set project reference to use will card.

 modified:   src/Microsoft.Graph/Tasks/PageIterator.cs

 * Moved iterator state to IntrapageIterate.
 * Fixed queue bug.
 * Added nextLink detection.
 * NOTE> Requires change to namespace before merge.
 * NOTE> Requires PageIterator.cs removal from M.G.C. before merge.

 modified:   tests/Microsoft.Graph.DotnetCore.Test/Mocks/MockUserEventsCollectionPage.cs

 * Fix mock deltaLink and nextLink.

 modified:   tests/Microsoft.Graph.DotnetCore.Test/Tasks/PageIteratorTests.cs

 * Added loop detection test.
 * NOTE> Will need to change namespace alias for PageIterator before merge.
peombwa
peombwa previously approved these changes Aug 13, 2019
@MIchaelMainer MIchaelMainer merged commit 4186d84 into dev Aug 15, 2019
@MIchaelMainer MIchaelMainer deleted the mm/movePageIterator branch August 15, 2019 22:10
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.

PageIterator StackoverflowException on large dataset

3 participants