huan / flash-store

FlashStore is a high-performance Key-Value Persistent Local Database using ES6 Map's API (Async & Sync), Powered by LevelDB/RocksDB/SQLite and TypeScript.
https://paka.dev/npm/flash-store
Apache License 2.0
20 stars 4 forks source link

Can not get data success #79

Closed su-chang closed 4 years ago

su-chang commented 4 years ago

flash-store version: v0.18.14

I can not provided the exact reproduce step for this problem. And Im not sure this problem is related compactDB() method or not.

It occurs in these cases:

Log

ReadError: Unexpected end of JSON input
    at /xiaoju-bot/node_modules/levelup/lib/levelup.js:194:15
    at /xiaoju-bot/node_modules/encoding-down/index.js:79:14
    at /xiaoju-bot/node_modules/medeadown/medeadown.js:129:7
    at /xiaoju-bot/node_modules/medea/medea.js:551:15
    at FSReqWrap.wrapper [as oncomplete] (fs.js:463:17)
su-chang commented 4 years ago

Related issue: https://github.com/wechaty/wechaty-puppet-padplus/issues/201

huan commented 4 years ago

Thanks for the issue.

It seems that Medea db has some issues in our production environment.

I'll try to use SQLite3 as the backend in the next version of FlashStore, and I hope that the SQLite3 will be more stable and relaiable.

su-chang commented 4 years ago

Anything update about this problem?

flash-store@0.14.1 will throw segment fault error occasionally, when wechaty-puppet-xxx reset.

Could I do something for this?

huan commented 4 years ago

I'm using flash-store@0.12 now, you can have a try on that version.

su-chang commented 4 years ago

Thank you for your suggestion, I will have a try on that.

su-chang commented 4 years ago

I'm using flash-store@0.12 now, you can have a try on that version.

flash-store@0.12 has same problem as flash-store@0.14.

huan commented 4 years ago

Sad to know that.

Then I believe flash-store@0.7 is your last choice to try.

su-chang commented 4 years ago

Bad news, flash-store@0.7.0 can not install successfully in win32 platform.

huan commented 4 years ago

It seems that it's the time to push flash-store forward 1 step now.

Before we upgrade the FlashStore, you have a last chance with flash-store@0.16, I don't know if SnapDB can work well... If we are lucky enough.

su-chang commented 4 years ago

flash-store@0.12.7 flash-store@0.14.5

These versions could resolve this problem.

After testing flash-store@0.19.1, if it works nice, I will close this issue.

huan commented 4 years ago

Good to know that, thanks for the confirmation!