-
Notifications
You must be signed in to change notification settings - Fork 172
Checking ITruncatedCollecton.IsTruncated after enumeration. Fixes #1384 #1393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking ITruncatedCollecton.IsTruncated after enumeration. Fixes #1384 #1393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- src/Microsoft.AspNetCore.OData/Formatter/Serialization/ODataResourceSetSerializer.cs: Evaluated as low risk
- test/Microsoft.AspNetCore.OData.Tests/Formatter/Serialization/SerializationTestsHelpers.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
test/Microsoft.AspNetCore.OData.E2E.Tests/ServerSidePaging/ServerSidePagingDataModel.cs:108
- The Dispose method is empty. If the class implements IDisposable, it should properly dispose of any unmanaged resources.
public void Dispose()
Hi, Is that MR (and a few other you propose that looks related) are in definitive to locally fix the server-driven paging feature that drastically reduce performances ? See also #1271 (comment) I believe your recent PR they could help a lot for that topic. |
Hi @WanjohiSammy |
test/Microsoft.AspNetCore.OData.E2E.Tests/ServerSidePaging/ServerSidePagingControllers.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- test/Microsoft.AspNetCore.OData.E2E.Tests/ServerSidePaging/ServerSidePagingControllers.cs: Evaluated as low risk
- test/Microsoft.AspNetCore.OData.Tests/Formatter/Serialization/ODataResourceSetSerializerTests.cs: Evaluated as low risk
This PR fixes #1384
The reading of ITruncatedCollection.IsTruncated (used by ODataResourceSetSerializer for nested resource sets) is postponed until after enumeration have completed.
This change is to support other implementations of ITruncatedCollection than the List based TruncatedCollection. Other implementations might not have the collection in memory when before enumeration starts and thus might not know if the data has been truncated like the List based one.
Some tests have been added - both my attempt to write a unittest with Mocks and an E2E test.