Open mkv opened 2 years ago
I'm having this issue as well. I use importDocuments
with onDuplicateUpdate
option.
Here's the kind of results I get:
null
:
[null,null,null]
,[null,null,{"id":"225","t":"Item 225"}]
The expected result:
[{"id":"348","t":"Item 348"}, {"id":"112","t":"Item 112"}, {"id":"225","t":"Item 225"}]
I run the latest 3.9.2 version.
I use Golang SDK and use ImportDocuments
function with ImportOnDuplicateUpdate
preference if SDK matters.
I grab document _key
s in a subquery and then loop over the subquery _key
s array to "JOIN
" the results with another collection so this looks like the document first exists because the subquery finds the _key
and then disappears when querying for it in the second query.
I can't rely on Arango giving partial or incorrect results during updates.
You mentioned that it
(looks like it is disappeared) from view for 2-3 seconds.
Yes, it looks like it does REPLACE
where it would first DELETE
the document and then INSERT
a new copy instead of doing an UPDATE
.
Note: while I thought this might have been an eventual consistency issue, it makes no sense, because in that case, the query would just return the old version of the document, not null
.
answered here https://github.com/arangodb/arangodb/issues/17482
Fixed starting from 3.11
My Environment
Steps to reproduce
or
Continuously run query to get document
Update some field in a document in the collection. The field may be linked to the view or not.
Problem: After update we cannot receive document (looks like it is disappeared) from view for 2-3 seconds.
Expected result: Last version of the document is available all the time, independently of any updates.