currenjin opened a new pull request, #13805:
URL: https://github.com/apache/skywalking/pull/13805
## What's this PR about?
`JFRDataQueryEsDAO.getByTaskIdAndInstancesAndEvent()` checks
`isMergedTable()` with the wrong index name.
**Before:**
```java
if
(IndexController.LogicIndicesRegister.isMergedTable(AsyncProfilerTaskRecord.INDEX_NAME))
{
```
This checks whether `"async_profiler_task"` is a merged table, but the
method is querying `JFRProfilingDataRecord` (`"jfr_profiling_data"`).
**After:**
```java
if
(IndexController.LogicIndicesRegister.isMergedTable(JFRProfilingDataRecord.INDEX_NAME))
{
```
If the two tables have different merge configurations, the
`RECORD_TABLE_NAME` filter could be incorrectly skipped or unnecessarily added,
potentially returning data from other record types.
Every other ES DAO in the codebase passes its own `INDEX_NAME` to
`isMergedTable()`. This one was likely a copy-paste from
`AsyncProfilerTaskQueryEsDAO`.
## Which issue does this PR relate to?
N/A — found by code review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]