A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
MIT License
491
stars
27
forks
source link
Max storage recordSize and/or pageSize (65536) not working #110
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.
When setting the
recordSize
orpageSize
to the max of 65536 (216) in thestorage
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.To fix this I will be treating a recordSize and/or pageSize of 0 in the file as the max of 65536.