automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

Add test opening 2500 cores #54

Closed mjtognetti closed 1 year ago

mjtognetti commented 4 years ago

Adding this to test hitting the max open file limit. It surfaces some limitations with the current implementation of repo.close(), noted in the comments.

Repeated here: This timeout is a hack - we don't have a way to safely close the repo. In this case, we have a feed.ready() callback which writes to the FeedInfoStore db. This callback throws if the database has been closed. We need a way to either safely shut down (build a queue and let it drain, making repo.close() async) - or - we should implement a hard shut down which clears those queues.