wankai123 commented on PR #10049:
URL: https://github.com/apache/skywalking/pull/10049#issuecomment-1330520741
> > I think this can't be read if the time bucket is wrong, right?
>
> No, I have done the code research. When we query the records, we just use
the alias name, such as `records-all`, the wrong index name will be
`records-all-YYYYMM`. But for the long term, the data cannot be queried,
because we have the `TTL` mechanism to delete the wrong and older indexes. In
the E2E, unless we query it for a long time, so we cannot find this kind of
problem.
I think we should query like this:
```java
final SearchResponse response = getClient().search(
new TimeRangeIndexNameGenerator(
IndexController.LogicIndicesRegister.getPhysicalTableName(SegmentRecord.INDEX_NAME),
startSecondTB,
endSecondTB
), search.build());
```
--
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]