Hi there,
I'm using a Foxx app to execute transactions. To boost query efficiency
(the system is read-heavy), I try to cache the count of edges directly in
the docs, and do this like that:
db.likes.insert('users/' + issuerId, 'posts/' + postId, {}, true);
// the post object was fetched before
post.stats.likeCount = db.likes.byExample({ _to: 'posts/' + postId }).count
();
db.posts.replace({ _id: post._id }, post);
Notice the last *true* parameter passed to *insert* to make sure that we
wait for the write to be flushed. This code is executed within a
transaction by the way.
This works well on my dev machine (Windows 10) *but* it seems that the
count is not systematically updated correctly on the staging server
(Ubuntu). What's weird is that sometimes it works and sometimes it doesn't,
which makes me think about a threading/concurrency issue (and that's why I
added the waitForSync param).
Any help or suggestion would be greatly appreciated here.
Thanks,
Thomas
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.