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

[BUG] 指标文件读取方法不正确 #3462

Open
brucelwl opened this issue Oct 27, 2024 · 2 comments · May be fixed by #3465
Open

[BUG] 指标文件读取方法不正确 #3462

brucelwl opened this issue Oct 27, 2024 · 2 comments · May be fixed by #3465

Comments

@brucelwl
Copy link

while ((second = indexIn.readLong()) < beginSecond) {
offset = indexIn.readLong();
lastPosition.offsetInIndex = in.getChannel().position();
}

209行 offset = indexIn.readLong(); 不应该写, 应该剔除这行, 这样会导致读取的数据不正确

假如读取的是 1729965161000L的数据, 返回的是1729965162000L及之后的数据,
但如果1729965161000L是文件的最后一个时间的记录数据, 又会被读取到

List<MetricNode> metricNodes = searcher.find(1729965161000L, 5);
@manojks1999
Copy link

@brucelwl , I have made a PR please have a look and let me know if any changes are required.

Thanks

@brucelwl
Copy link
Author

@manojks1999 看着没什么问题

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

Successfully merging a pull request may close this issue.

2 participants