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

Make sure there's only one FlashStore instance are writing database files #73

Open huan opened 4 years ago

huan commented 4 years ago

There might be a Race Condition: two store instances are writing to one workdir db files together.

So we need to add a flock to make sure there's only one instance writing the workdir db files.

@windmemory