Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix that wrong metadata in search updater causes patch failure #1310

Conversation

thjaeckle
Copy link
Member

When loading the search index after initialization of the ThingUpdater, the metadata was not updated accordingly to the retrieved data, but the revision was kept at -1 which caused the next update to be a full update and also fail all other changes included in a bulk write.

This bugfix fixes that.

thjaeckle and others added 4 commits February 8, 2022 17:39
… bug

* on recovery of ThingUpdater, the "thingRevision" of Metadata was set hard to "-1" - this caused always a failed patch update
* fix is to restore the metadata from the read search index entry
* added better logging for bulk update results: included a correlationId for the bulk + differ between "Success" and "IncorrectPatch"
* enhanced existing testcase in ThingUpdaterTest to also test the lookup based recovery of the search index document and assert that revisionNumber is the expected one

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…sumed in ThingUpdater to quickly shut it down

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Yannic Klem <Yannic.Klem@bosch.io>
@Yannic92 Yannic92 merged commit fc2e373 into eclipse-ditto:master Feb 10, 2022
@Yannic92 Yannic92 deleted the bugfix/search-wrong-metadata-causes-patch-failure branch February 10, 2022 10:06
@thjaeckle thjaeckle added this to the 2.4.0 milestone Feb 10, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants