Skip to content
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

add metrics tracking lucene near real-time refresh delay #13307

Merged
merged 9 commits into from
Jun 26, 2024

Conversation

itschrispeck
Copy link
Collaborator

@itschrispeck itschrispeck commented Jun 4, 2024

Since the realtime Lucene index doesn't immediately make results available to searchers, this can cause confusion for users who see data, then search for it only to get no results. There is currently no visibility into how long they might have to wait for data to be searchable.

This adds two gauges:

LUCENE_INDEX_DELAY_MS
LUCENE_INDEX_DELAY_DOCS

These are per partition, and contain the value of the greatest delay across all columns. e.g., if you have two text indexes, on colA, and colB, if colA delay = 10s and colB delay = 20s, the gauge will emit 20s. This is pre-aggregated to avoid high cardinalities which is problematic for many metric systems.

Tested in an internal cluster.

sample delay:
image

suggested tags: enhancement, docs

@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.08%. Comparing base (59551e4) to head (df4e117).
Report is 677 commits behind head on master.

Files Patch % Lines
...ertedindex/RealtimeLuceneIndexingDelayTracker.java 93.84% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13307      +/-   ##
============================================
+ Coverage     61.75%   62.08%   +0.32%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2559     +123     
  Lines        133233   141302    +8069     
  Branches      20636    21918    +1282     
============================================
+ Hits          82274    87723    +5449     
- Misses        44911    46910    +1999     
- Partials       6048     6669     +621     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.01% <96.29%> (+0.30%) ⬆️
java-21 61.94% <96.29%> (+0.32%) ⬆️
skip-bytebuffers-false 62.07% <96.29%> (+0.32%) ⬆️
skip-bytebuffers-true 61.87% <96.29%> (+34.15%) ⬆️
temurin 62.08% <96.29%> (+0.32%) ⬆️
unittests 62.07% <96.29%> (+0.33%) ⬆️
unittests1 46.65% <1.85%> (-0.24%) ⬇️
unittests2 27.61% <94.44%> (-0.12%) ⬇️

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.

@Jackie-Jiang
Copy link
Contributor

cc @swaminathanmanish

@@ -40,4 +40,29 @@ public static void validatePartialOrFullSegmentName(String partialOrFullSegmentN
throw new IllegalArgumentException("Invalid partial or full segment name: " + partialOrFullSegmentName);
}
}

/**
* A util to extract the table name from a segment name.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be done in LLCSegmentName already today.

@chenboat chenboat merged commit 83b0c14 into apache:master Jun 26, 2024
19 of 20 checks passed
suyashpatel98 pushed a commit to suyashpatel98/pinot that referenced this pull request Jul 6, 2024
* add metrics for lucene nrt delay

* license

* fix test, mock ServerMetrics

* lint

* missed mock metrics

* missed cherry-pick

* close ordering

* address comment

* use LLCSegmentName instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants