Skip to content

Conversation

@mbutrovich
Copy link
Contributor

@mbutrovich mbutrovich commented Jan 6, 2026

Which issue does this PR close?

N/A.

Rationale for this change

Profiling of Iceberg table scans revealed significant overhead from timer calls (clock_gettime) in the IcebergFileStream state machine.

What changes are included in this PR?

Move baseline.record_poll() from inside the state machine (where it wrapped every batch poll) to the top-level poll_next() method, matching the DataFusion FileStream pattern:

  • Remove nested record_poll() in the Reading state
  • Add record_poll() call at the top-level poll_next()

How are these changes tested?

Existing tests.

@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.58%. Comparing base (f09f8af) to head (ef9af62).
⚠️ Report is 828 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3050      +/-   ##
============================================
+ Coverage     56.12%   59.58%   +3.45%     
- Complexity      976     1368     +392     
============================================
  Files           119      167      +48     
  Lines         11743    15497    +3754     
  Branches       2251     2573     +322     
============================================
+ Hits           6591     9234    +2643     
- Misses         4012     4966     +954     
- Partials       1140     1297     +157     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@hsiang-c hsiang-c left a comment

Choose a reason for hiding this comment

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

LGTM

@mbutrovich mbutrovich merged commit 91f0f7b into apache:main Jan 6, 2026
174 checks passed
@mbutrovich mbutrovich deleted the iceberg_scan_metrics branch January 6, 2026 23:53
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.

4 participants