Fix wrong merged table check in JFRDataQueryEsDAO#13805
Merged
mrproliu merged 2 commits intoapache:masterfrom Apr 8, 2026
Merged
Fix wrong merged table check in JFRDataQueryEsDAO#13805mrproliu merged 2 commits intoapache:masterfrom
mrproliu merged 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an Elasticsearch DAO query guard so JFRDataQueryEsDAO.getByTaskIdAndInstancesAndEvent() correctly checks whether the JFR profiling data index is configured as a merged table, ensuring the merged-table discriminator filter is applied (or skipped) against the right logical index.
Changes:
- Switch
isMergedTable()to useJFRProfilingDataRecord.INDEX_NAMEinstead ofAsyncProfilerTaskRecord.INDEX_NAME. - Remove the now-unused
AsyncProfilerTaskRecordimport.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mrproliu
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this PR about?
JFRDataQueryEsDAO.getByTaskIdAndInstancesAndEvent()passes the wrong index name toisMergedTable().The method queries
jfr_profiling_data, but the merged table check usesasync_profiler_task. Every other ES DAO passes its ownINDEX_NAME. This one was copied fromAsyncProfilerTaskQueryEsDAOwithout updating.With the default config (
logicSharding=false), both tables resolve torecords-all, soisMergedTable()returnstruefor both and the behavior happens to be correct. But withlogicSharding=true, the two tables can have different physical names, and the check would produce the wrong result.Which issue does this PR relate to?
N/A - found by code review.