Skip to content

test(fileservice): cover streaming disk cache edge cases#24780

Open
LeftHandCold wants to merge 1 commit into
matrixorigin:mainfrom
LeftHandCold:add-fileservice-streaming-cache-tests
Open

test(fileservice): cover streaming disk cache edge cases#24780
LeftHandCold wants to merge 1 commit into
matrixorigin:mainfrom
LeftHandCold:add-fileservice-streaming-cache-tests

Conversation

@LeftHandCold
Copy link
Copy Markdown
Contributor

Summary

  • add coverage for range reads bypassing a prefetch full-object io merge
  • add streaming full-object disk cache coverage for read-to-end and unexpected EOF cases
  • add coverage for WriterForRead, ReadCloserForRead, and empty ranges being excluded from streaming disk cache fill

Tests

  • GOCACHE=/private/tmp/mo-gocache-fileservice-ut go test -mod=readonly ./pkg/fileservice -run 'TestS3FSRangeReadSkipsPrefetchFullObjectIOMerge|TestS3FSReadFullObjectToDiskCacheStreamingReadToEnd|TestS3FSReadFullObjectToDiskCacheStreamingUnexpectedEOF|TestS3FSShouldStreamFullObjectToDiskCacheExclusions|TestS3FSReadFullObjectToDiskCacheStreamingReturnsReaderError' -count=1
  • GOCACHE=/private/tmp/mo-gocache-fileservice-ut go test -mod=readonly ./pkg/fileservice -count=1

Copilot AI review requested due to automatic review settings June 2, 2026 08:03
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new test coverage for streaming disk cache edge cases in pkg/fileservice/s3_fs_test.go, including range reads bypassing prefetch full-object IO merge, read-to-end (-1 size) handling, unexpected EOF, and exclusions in shouldStreamFullObjectToDiskCache for empty ranges, WriterForRead, and ReadCloserForRead.

Changes:

  • Add TestS3FSRangeReadSkipsPrefetchFullObjectIOMerge verifying range reads don't block on in-flight prefetch merges
  • Add streaming disk cache tests for read-to-end and unexpected EOF behaviors
  • Add TestS3FSShouldStreamFullObjectToDiskCacheExclusions covering exclusion conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants