You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for your fantastic work! It was a real relief not to have to create that kind of tool by myself :).
I first describe my config (I'll try to be concise), then my issue and finally a solution to mitigate the issue.
Actual config:
monstache version 6.7.16
Go version go1.20.4
MongoDB go driver v1.12.1
Elasticsearch go driver 7.0.31
MongoDB version 6.0.6
Elasticsearch version 8.11.0
I have 2 collections: collA and collB each in its own database belonging to the same MongoDB instance.
I am joining those two collections into one ES index consolidatedIndex, the documents of collB having a field named collAId relating to collA._id
Relation is one to one between those collections.
I defined the relation in monstache.config.toml
[[relate]]
namespace = "dbB.collB"with-namespace ="dbA.collA"src-field = "collAId"match-field = "_id"match-field-type = "objectId"# `collAId` is a stringkeep-src = false
And I use a transformation Javascript plugin to join both collections using findOne on collB.
It happens very often in my project the following:
Insert a document into collA
a few seconds later approximately at the same time:
a. Insert related document to collB
b. update the collA document
It happens from time to time (and once it started it will repeat very often), that I get a version conflict and that my data fail to have last document version from collA.
My question: How is version generated by default when collB trigger a change since it relates to collA?
How should I address this issue?
Thank you very much for your help!
The text was updated successfully, but these errors were encountered:
Hello,
Thank you very much for your fantastic work! It was a real relief not to have to create that kind of tool by myself :).
I first describe my config (I'll try to be concise), then my issue and finally a solution to mitigate the issue.
Actual config:
I have 2 collections:
collA
andcollB
each in its own database belonging to the same MongoDB instance.I am joining those two collections into one ES index
consolidatedIndex
, the documents ofcollB
having a field namedcollAId
relating tocollA._id
Relation is one to one between those collections.
I defined the relation in
monstache.config.toml
And I use a transformation Javascript plugin to join both collections using
findOne
oncollB
.It happens very often in my project the following:
collA
a. Insert related document to
collB
b. update the
collA
documentIt happens from time to time (and once it started it will repeat very often), that I get a version conflict and that my data fail to have last document version from
collA
.My question: How is
version
generated by default whencollB
trigger a change since it relates tocollA
?How should I address this issue?
Thank you very much for your help!
The text was updated successfully, but these errors were encountered: