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: data with wrong format in pika 4.0 maybe NOT be fixed. #2886

Closed
QlQlqiqi opened this issue Aug 31, 2024 · 2 comments · Fixed by #2888
Closed

bug: data with wrong format in pika 4.0 maybe NOT be fixed. #2886

QlQlqiqi opened this issue Aug 31, 2024 · 2 comments · Fixed by #2888
Labels
☢️ Bug Something isn't working

Comments

@QlQlqiqi
Copy link
Contributor

QlQlqiqi commented Aug 31, 2024

Is this a regression?

Yes

Description

#2836 修复的 bug 会导致持久化问题。修复前的错误格式数据和新数据难以区分。磁盘中,旧格式数据中没有保存后 24Byte 的后缀内容,但是新格式中有,然后因为代码中会对磁盘数据进行 StripSuffix 操作,会导致数据错误解析。

满足下面情况的旧格式数据可以被恢复:

  • 如果旧格式数据长度小于 24B,那么可以判断出其为旧格式数据,可以将其转为新格式数据。

满足下面情况的旧格式数据可能被恢复:

  • 如果数据格式的后 24B 到后 8B 的位置全为 0,但是如果用户数据恰好构造成如此,那么会导致用户数据错误。或者这样也会让本来属于 reserve 位置的数据被使用,不符合 reserve 定义。

这种情况即使数据迁移也不行。

Please provide a link to a minimal reproduction of the bug

No response

Screenshots or videos

No response

Please provide the version you discovered this bug in (check about page for version information)

No response

Anything else?

No response

@QlQlqiqi
Copy link
Contributor Author

QlQlqiqi commented Sep 2, 2024

还有一些分析在相关 pr 中

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


There are also some analyzes in related pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️ Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@QlQlqiqi @Issues-translate-bot and others