[GH-ISSUE #110] Max storage recordSize and/or pageSize (65536) not working #61

Closed
opened 2026-05-23 08:28:43 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @appy-one on GitHub (May 25, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/110

Originally assigned to: @appy-one on GitHub.

When setting the recordSize or pageSize to the max of 65536 (216) in the storage settings, the created db doesn't work. Because the value 216 requires a 17th bit to store 1 followed by 16 zeroes, the settings written to the file are 16 bit and become 0. Because a recordSize of 0 does not store any data, this is a very quick dead end.

const db = new AceBase('mydb', { storage: { recordSize: 65536 } }); // Problem!

To fix this I will be treating a recordSize and/or pageSize of 0 in the file as the max of 65536.

Originally created by @appy-one on GitHub (May 25, 2022). Original GitHub issue: https://github.com/appy-one/acebase/issues/110 Originally assigned to: @appy-one on GitHub. When setting the `recordSize` or `pageSize` to the max of 65536 (2<sup>16</sup>) in the `storage` settings, the created db doesn't work. Because the value 2<sup>16</sup> requires a 17th bit to store 1 followed by 16 zeroes, the settings written to the file are 16 bit and become 0. Because a recordSize of 0 does not store any data, this is a very quick dead end. ```js const db = new AceBase('mydb', { storage: { recordSize: 65536 } }); // Problem! ``` To fix this I will be treating a recordSize and/or pageSize of 0 in the file as the max of 65536.
gitea-mirror 2026-05-23 08:28:43 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@appy-one commented on GitHub (May 26, 2022):

Fix has been published in v1.20.0

<!-- gh-comment-id:1138446430 --> @appy-one commented on GitHub (May 26, 2022): Fix has been published in v1.20.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#61
No description provided.