question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple node processes support with a single datastore file

See original GitHub issue

I was running two node servers, each on different ports, but both reading and writing to the same persistent datastore file. It looks like each node process is reading its own copy of the doc from the file.

For example, node process one creates the first record below, and second node process creates the second record. The dump of the data file contains both record, but each process can only read one that has been created by itself.

{"path":"/path","time":1386333352657,"_id":"FLRlkL2deQMA1RyZ"}
{"path":"/path","time":1386333358367,"_id":"BzTn0GRGq67Mwco8"}

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
Meekohicommented, Mar 18, 2014

I wish this had been clearly described in the initial README. Wasted a lot of time implementing a solution with this before realizing this major issue.

1reaction
vangelovcommented, May 6, 2017

Recently I struggled with this problem and came up with a solution that is similar to nedb-party but a bit more robust: https://github.com/vangelov/nedb-multi, hope it helps someone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sharing a VMFS Datastore Across Hosts - VMware Docs
As a cluster file system, VMFS lets multiple ESXi hosts access the same VMFS datastore concurrently.
Read more >
Write to Multiple Data Store Entities Smart Service - Appian 22.4
You can write to multiple EntityData inputs through one transaction by creating an array of EntityData objects for the EntityData value. All entities...
Read more >
Google Cloud Datastore: Node.js Client
Cloud Datastore Client Library for Node.js. A comprehensive list of changes in each version may be found in the CHANGELOG.
Read more >
Data Nodes and data storage - IBM® QRadar
Note: You can connect a Data Node to only one processor at a time, but a processor can support multiple Data Nodes. Deployment...
Read more >
Understand data store models - Azure - Microsoft Learn
Note that a particular data store technology may support multiple ... Multiple operations have to be completed in a single transaction.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found