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

The problem with method:calculateDataLength() #18

Open
308twin opened this issue Sep 17, 2024 · 1 comment
Open

The problem with method:calculateDataLength() #18

308twin opened this issue Sep 17, 2024 · 1 comment
Labels

Comments

@308twin
Copy link

308twin commented Sep 17, 2024

I encountered a strange issue while testing inserts from k1000 to k1. When inserting in ascending order, the page management behaves normally, but when inserting in descending order, new pages are frequently requested. After conducting breakpoint testing, I believe the issue lies in the calculateDataLength method, particularly in this part of the code:

if (currentDataLen > 0) {
return currentDataLen;
}

When a page splits, the original page always uses the old value instead of recalculating. I understand that you implemented this to avoid repeated calculations, but it seems to have introduced some bugs.

Best regards.

@myui
Copy link
Owner

myui commented Nov 1, 2024

@308twin Could you share your test code to reproduce it? thanks.

@myui myui added the bug label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants