Hi folks,
I'm currently working on a project which has a "projection" storage implemented using Elasticsearch. I have a few questions about external versioning.
First of all in general, in documentation it is said
Blockquote
external_gte version type is meant for special use cases and should be used with care. If used incorrectly, it can result in loss of data
Blockquote
Why exactly it is so? Can you provide more details?
In my case in primary storage let's say I keep a set of entities and every single of them has a version number. And now it is possible to perform two kind of operations:
-
User make changes to a single entity which will internally cause version of entity be incremented. Then system schedules an operation which will create a document based on entity data and then index in Elasticsearch.
-
Someone from support team would like to recreate/refresh projection storage based on data kept in primary storage using bulk request. In this case version of entity might not change.
So, I thought of using external/external_gt for a first case and external_gte for second scenario. Another option is to use external_gte version type for both scenarios but I'm wondering what is a reason not to use it?
Do you have any recommendation to this case?
Thanks,
Piotr