-
Notifications
You must be signed in to change notification settings - Fork 292
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 Blake2b hash #5089
base: main
Are you sure you want to change the base?
Fix Blake2b hash #5089
Conversation
Signed-off-by: Terry Quigley <[email protected]>
Signed-off-by: Terry Quigley <[email protected]>
Signed-off-by: Terry Quigley <[email protected]>
Signed-off-by: Terry Quigley <[email protected]>
Note: In a mixed cluster state, this will yield inconsistent results: Some nodes will hash value A to hash X, while other nodes will hash value A to hash Y. This will especially affect aggregations. Are we okay with this (genuine question)? In any case, this should be documented. |
@nibix Thank you for your comment. That is not something that I would have been aware of. I still strongly lean towards putting this change in.
|
@terryquigleysas One way to work around that issue would be to gate the new behavior by a config option that can be changed at runtime (In config.yml for example). That way, the behavior can be changed from old to new nearly instantaneously, thus reducing the chance of inconsistent aggregations massively. |
@nibix What would you suggest naming the property? |
Just to avoid any misunderstanding: I am in no position to give authoritative rulings on such changes. I can only give my opinion and my recommendations. Any unclear issues need to be clarified in a community driven process. To reiterate the issue:
A dynamically changeable config flag would solve this the following way:
If the config flag would be initially set to the new behavior, the issue would be actually not avoidable. Having said this, this approach has indeed the downside that it needs manual intervention of an admin after the completion of the rolling upgrade. There would be also not an easy way to automate that. Another alternative solution might be to use the cluster state to check whether the cluster is in a mixed state or not. The cluster state API provides methods for that. However, TBH, I am not sure how easy these APIs are accessible from the very low level code we are talking about. |
FYI There is a class called ClusterInfoHolder that listens to changes in cluster state and can be interrogated to find the min node version in a cluster. |
How should we proceed here? As far I see, there are 2 choices:
|
This has the downside that it makes certain uses cases impossible in mixed cluster states. If there are, for example, alerting solutions on such data, these might produce false positives in this phase. What are the exact high availability and compatibility promises OpenSearch makes? I guess we need to know these in order to decide whether this is viable.
One downside is here also that the change happens to an kind of uncontrolled point in time. If there are use cases which depend on specific hashes, this also might present a challenge to react to the changed hashes in the right point in time. I think there are a couple of further options:
|
@nibix @cwperks Thank you for the comments and suggestions. I have been on vacation for a few days and just catching up on this. I have looked at checking for the min cluster version. Unfortunately I don't think it is feasible for several reasons. As mentioned above, making these settings available to the relevant code doesn't look trivial. There would likely be an unwanted performance hit for the checks, and even then it would still result in erratic results in various scenarios. I think we could however use an existing option to support setting the default masking algorithm to revert to the legacy behavior- see https://opensearch.org/docs/latest/security/access-control/field-masking/#advanced-use-an-alternative-hash-algorithm. For example:
This means that:
What do you think? |
Description
This may be considered a "Breaking Change" for 3.0.0 as the hashes will now be different - correct, but different from before.
Issues Resolved
Resolves #4274
Testing
Updated existing tests.
Ran Bulk Integration Test action against the branch.
Local testing.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.