Comments (5)
@frednomoon to record information on the disk is used mmap
therefore entry does not occur instantly,
perhaps this is the reason
quote
At the moment tiedot does not use a journal file, therefore it relies on operating system to periodically synchronize mapped file buffer with underlying storage device; this means, that in case of a system crash, you may lose several most recent document updates.
but maybe I'm wrong
from tiedot.
@agoalofalife thanks for the quick response Ilya!
I'll expand on my explanation to say why I don't think that is the problem... In the situation I describe, service A adds a new Document which it is almost immediately able to read/ update etc. Despite service A being able to see the new document it has added, service B cannot see it. This situation persists until I restart service B (I have seen this happen for >5 minutes).
Also to be more specific in what I mean by "restart". I mean that the tiedot function openDB
needs to be called, which I usually would do once upon starting the application.
I have solved the problem for now in my application by simply calling openDB again when I need service B to check for new information. But I am still interested to find out what is happening in the background!
from tiedot.
Hello @frednomoon.
I am sorry to say that this use case is not well supported. OpenDB
function is very expensive to call, it may take up to several seconds to finish for a large collection, and there cannot be two DB instances operating under the same data directory.
For your use case, please consider running an HTTP service on the server A and let server B use HTTP client to query for the new document.
from tiedot.
I have not read the original code
I can try to guess again
maybe something is stored in memory, because the main use of using REST API
I think the addresses of the documents are stored in the buffer
you can write a function to fill or update the buffer
more details probably will answer @HouzuoGuo
In any case, good luck!
from tiedot.
Thanks for the responses!
from tiedot.
Related Issues (20)
- duplicate init HOT 2
- Delete old repository HOT 3
- Add tiedot in codesponsor HOT 1
- Merry Christmas and happy new year! HOT 2
- concurrent write and foreach not working as expected. HOT 2
- My ID is storing in scientific notation HOT 1
- httpapi: suspicious condition in srv_test.go
- Func CreateOrReadConfig, config file is created but not closed
- does tiedot has max storage limit? HOT 1
- Add examples/information for pull request #157 HOT 1
- Incremented record ID HOT 4
- Replace bou.ke/monkey HOT 2
- Increase size of parsed doc HOT 1
- Any plan on replication/sync? HOT 1
- Indexing and range lookup on datetime HOT 2
- Tiedot take a lot of storage HOT 2
- "Like" or Fuzzy search HOT 1
- who can tel me,why col include db RWMutex,another single RWMutex in col? HOT 1
- update a document lead to overwrite a document
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiedot.