wu-sheng commented on code in PR #12432:
URL: https://github.com/apache/skywalking/pull/12432#discussion_r1673948544
##########
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/measure/BanyanDBTagAutocompleteQueryDAO.java:
##########
@@ -54,12 +54,16 @@ public
BanyanDBTagAutocompleteQueryDAO(BanyanDBStorageClient client) {
@Override
public Set<String> queryTagAutocompleteKeys(TagType tagType, int limit,
Duration duration) throws IOException {
MetadataRegistry.Schema schema =
MetadataRegistry.INSTANCE.findMetadata(TagAutocompleteData.INDEX_NAME,
DownSampling.Minute);
- long startTB = 0;
- long endTB = 0;
+ long startSecondTB = 0;
+ long endSecondTB = 0;
if (nonNull(duration)) {
- startTB =
TimeBucket.getMinuteTimeBucket(duration.getStartTimestamp());
- endTB = TimeBucket.getMinuteTimeBucket(duration.getEndTimestamp());
+ startSecondTB = duration.getStartTimeBucketInSec();
+ endSecondTB = duration.getEndTimeBucketInSec();
}
+
+ long startTB = startSecondTB / 1000000 * 10000;
+ long endTB = endSecondTB / 1000000 * 10000 + 2359;
Review Comment:
Then, some tests could be added.
--
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]