Skip to content

Conversation

@eric-wang-1990
Copy link
Contributor

@eric-wang-1990 eric-wang-1990 commented Oct 31, 2025

Summary

Clarifies memory manager behavior - Documents that CloudFetchMemoryBufferManager tracks in-flight compressed download sizes and reduces the default from 200MB to 100MB

Memory Manager Clarification

The CloudFetchMemoryBufferManager tracks in-flight download memory based on compressed file sizes, not decompressed sizes. This design is intentional:

  1. Limits concurrent downloads - Prevents unbounded parallel downloads from exhausting system resources
  2. Natural decompression bounds - Decompressed data memory is naturally bounded by the result queue capacity and batch processing flow
  3. Lightweight concurrency control - Tracking compressed sizes provides efficient download throttling without overhead of tracking decompressed memory

Changes

  • Added comprehensive documentation to CloudFetchMemoryBufferManager explaining it tracks in-flight compressed data sizes
  • Reduced DefaultMemoryBufferSizeMB from 200 to 100 in CloudFetchDownloadManager
  • Added inline comments clarifying that size parameters represent compressed file sizes from the server

Test plan

  • Existing CloudFetch tests pass
  • Manual testing with CloudFetch queries to verify download behavior

🤖 Generated with Claude Code

eric-wang-1990 and others added 3 commits October 30, 2025 18:14
…nd reduce default limit

The CloudFetchMemoryBufferManager tracks in-flight download memory based on
compressed file sizes, not decompressed sizes. This is intentional, as:

1. The memory manager limits concurrent downloads to prevent unbounded resource usage
2. Decompressed data memory is naturally bounded by the result queue capacity and
   batch processing flow
3. Tracking compressed sizes provides a lightweight mechanism to control download
   concurrency without the overhead of tracking decompressed memory

The default memory limit has been reduced from 200MB to 100MB to provide better
control over concurrent download behavior. With typical file sizes of ~1MB compressed,
this allows for approximately 100 concurrent in-flight downloads.

Changes:
- Added detailed documentation to CloudFetchMemoryBufferManager explaining it tracks
  in-flight compressed data sizes
- Reduced DefaultMemoryBufferSizeMB from 200 to 100 in CloudFetchDownloadManager
- Added inline comments clarifying that size parameters represent compressed file sizes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Oct 31, 2025
@eric-wang-1990 eric-wang-1990 changed the title feat(csharp/databricks): Clarify CloudFetch memory manager behavior and reapply memory improvements feat(csharp/databricks): Clarify CloudFetch memory manager behavior and set appropriate limit Oct 31, 2025
@CurtHagenlocher CurtHagenlocher changed the title feat(csharp/databricks): Clarify CloudFetch memory manager behavior and set appropriate limit feat(csharp/Drivers/Databricks): Clarify CloudFetch memory manager behavior and set appropriate limit Oct 31, 2025
@CurtHagenlocher CurtHagenlocher changed the title feat(csharp/Drivers/Databricks): Clarify CloudFetch memory manager behavior and set appropriate limit feat(csharp/src/Drivers/Databricks): Clarify CloudFetch memory manager behavior and set appropriate limit Oct 31, 2025
@CurtHagenlocher
Copy link
Contributor

Thanks, @eric-wang-1990! The comments say "Verify the original regression ... was resolved" but the code doesn't reflect either that the previous change was reapplied or that it was tested. Assuming the code reflects what you actually want to check in, could you edit the comment to match it please?

@eric-wang-1990
Copy link
Contributor Author

Thanks, @eric-wang-1990! The comments say "Verify the original regression ... was resolved" but the code doesn't reflect either that the previous change was reapplied or that it was tested. Assuming the code reflects what you actually want to check in, could you edit the comment to match it please?

Done

@CurtHagenlocher CurtHagenlocher merged commit a86b616 into apache:main Oct 31, 2025
7 of 12 checks passed
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.

2 participants