Thanks to visit codestin.com
Credit goes to github.com

Skip to content

update ingestion timestamp metadata when all rows filtered out#17758

Open
jadami10 wants to merge 3 commits intoapache:masterfrom
jadami10:jadami/oss-freshness-checker-all-filtered-out
Open

update ingestion timestamp metadata when all rows filtered out#17758
jadami10 wants to merge 3 commits intoapache:masterfrom
jadami10:jadami/oss-freshness-checker-all-filtered-out

Conversation

@jadami10
Copy link
Contributor

This is a small bug fix for an edge case where freshness never catches up on server restart. The series of events are:

  • you have a realtime Pinot table consuming from a partition
  • that partition ingests at least 1 event with freshness > than threshold
  • that partition ingests more events, but they are all filtered out by filterConfig or other custom stream plugin filtering
  • the minimumIngestionLag never drops below the initial indexed event
  • the server will wait until the timeout period is reached to start

Instead, we now detect when we've conusmed events but they've all been filtered, and we correctly set latest ingestion and min freshness based on current time.

I've added 1 unit test and 1 integration test for this. We also deployed this to the main production cluster that was having issues. Previously we would see

  • our ingestion plugin reporting < 1 minute lag within ~15 minutes
  • but the server taking ~3 hours to go healthy based on freshness if an unfiltered event came in

After this deployment:

  • the same server was healthy in < 15 minutes

}

@Test
public void testIngestionTimestampUpdatedWhenAllEventsFiltered()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was claude generated. I and claude could not figure out how to run the integration tests, so i'm relying on CI here to do it. If this doesn't work, I will just remove it.

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.20%. Comparing base (325ac2a) to head (96a1f35).
⚠️ Report is 20 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...a/manager/realtime/RealtimeSegmentDataManager.java 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17758      +/-   ##
============================================
+ Coverage     63.17%   63.20%   +0.02%     
  Complexity     1454     1454              
============================================
  Files          3176     3179       +3     
  Lines        191025   191321     +296     
  Branches      29206    29266      +60     
============================================
+ Hits         120688   120924     +236     
- Misses        60920    60956      +36     
- Partials       9417     9441      +24     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 55.56% <72.72%> (-7.59%) ⬇️
java-21 63.18% <72.72%> (+0.04%) ⬆️
temurin 63.20% <72.72%> (+0.02%) ⬆️
unittests 63.20% <72.72%> (+0.02%) ⬆️
unittests1 55.59% <72.72%> (+0.05%) ⬆️
unittests2 34.11% <54.54%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jadami-stripe
Copy link
Contributor

cc @noob-se7en got 1 more freshness checker fix for you

Copy link
Contributor

@noob-se7en noob-se7en left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

}
}
return new Result(rows, skippedRowCount, incompleteRowCount, sanitizedRowCount);
return new Result(rows, incompleteRowCount, skippedRowCount, sanitizedRowCount);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: unrelated

Copy link
Contributor

Choose a reason for hiding this comment

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

whoops - this was meant for a different PR

@jadami10
Copy link
Contributor Author

jadami10 commented Mar 4, 2026

cc @Jackie-Jiang - good to merge this as well?

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