Emit error log if deregistered search attribute in chasm vis task #8715
+5
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Emit warn log if deregistered search attribute in chasm vis task.
Original thread: #8662 (comment)
Current State
If user deregisters search attributes while the task is getting processed, current code leads to task failure.
In ES, if the search attribute has been deregistered, upsert SA task execution would still fail when generating the ES Doc and attempting to decode the value.
In the SQL implementation, since these fields are constant and always attached to the NameTypeMap/ClusterMetadata, Upserting these fields would succeed, so there is a discrepancy between these stores.
Why?
Once we have parity between ES and SQL for preallocated columns, we should not throw an error if a search attribute gets deregistered when executing the CHASM vis task and just do a best effort upsert call. User deregistering search attributes after archetype execution is a valid use case.
A valid concern is if the visibility component somehow has an incorrect search attribute (eg. field name). There was an issue the past caught because errors were thrown during translation, which showed search attribute already translated to field name before hitting the translation layer (due to application code bug). However, Error logs should be sufficient to debug.
How did you test it?