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

[Bug] Handle serialization issues with UpdateReplicationStateDetailsRequest #866

Merged
merged 1 commit into from
May 23, 2023

Conversation

ankitkala
Copy link
Member

@ankitkala ankitkala commented May 23, 2023

Description

UpdateReplicationStateDetailsRequest is not serialised and deserialised correctly.

Most of times this object doesn't require serialization as we're updating the state on cluster manager node where UpdateReplicationStateDetails action runs.

Issues Resolved

#865

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

@ankitkala
Copy link
Member Author

Security and knn tests are failing due to known build failures with security plugin

ERROR][o.o.s.f.SecurityFilter   ] [leaderCluster-0] Unexpected exception java.lang.NoSuchMethodError: 'boolean org.opensearch.common.Strings.isNullOrEmpty(java.lang.String)'
»  java.lang.NoSuchMethodError: 'boolean org.opensearch.common.Strings.isNullOrEmpty(java.lang.String)'
»  	at org.opensearch.security.privileges.PrivilegesEvaluator.setUserInfoInThreadContext(PrivilegesEvaluator.java:204) ~[opensearch-security-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]
»  	at org.opensearch.security.privileges.PrivilegesEvaluator.evaluate(PrivilegesEvaluator.java:248) ~[opensearch-security-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]
»  	at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:303) [opensearch-security-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]
»  	at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149) [opensearch-security-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]
»  	at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.action.support.TransportAction.execute(TransportAction.java:188) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.action.support.TransportAction.execute(TransportAction.java:107) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:476) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.client.support.AbstractClient$ClusterAdmin.execute(AbstractClient.java:788) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.client.support.AbstractClient$ClusterAdmin.health(AbstractClient.java:803) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.rest.action.admin.cluster.RestClusterHealthAction.lambda$prepareRequest$0(RestClusterHealthAction.java:85) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
»  	at org.opensearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:128) [opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
 ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [followCluster-0] fatal error in thread [DefaultDispatcher-worker-1 @coroutine#1], exiting
»  java.lang.NoClassDefFoundError: org/opensearch/core/common/Strings
»  	at org.opensearch.commons.authuser.User.parse(User.java:162) ~[common-utils-3.0.0.0-SNAPSHOT.jar:?]
»  	at org.opensearch.replication.util.SecurityContext$Companion.fromSecurityThreadContext(SecurityContext.kt:65) ~[opensearch-cross-cluster-replication-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]
»  	at org.opensearch.replication.action.index.TransportReplicateIndexAction$doExecute$1.invokeSuspend(TransportReplicateIndexAction.kt:66) ~[opensearch-cross-cluster-replication-3.0.0.0-SNAPSHOT.jar:3.0.0.0-SNAPSHOT]

@ankitkala ankitkala marked this pull request as ready for review May 23, 2023 09:57
@ankitkala ankitkala requested a review from gbbafna as a code owner May 23, 2023 09:57
@ankitkala ankitkala enabled auto-merge (squash) May 23, 2023 09:58
@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Merging #866 (06af768) into main (e3256eb) will increase coverage by 0.36%.
The diff coverage is 100.00%.

❗ Current head 06af768 differs from pull request most recent head b0bb314. Consider uploading reports for the commit b0bb314 to get more accurate results

@@             Coverage Diff              @@
##               main     #866      +/-   ##
============================================
+ Coverage     72.24%   72.60%   +0.36%     
+ Complexity     1005     1002       -3     
============================================
  Files           141      141              
  Lines          4694     4695       +1     
  Branches        527      527              
============================================
+ Hits           3391     3409      +18     
+ Misses          970      953      -17     
  Partials        333      333              
Impacted Files Coverage Δ
...atedetails/UpdateReplicationStateDetailsRequest.kt 100.00% <100.00%> (+43.75%) ⬆️

... and 3 files with indirect coverage changes

opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 23, 2023
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#874)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#867)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#868)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#870)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#869)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#872)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#871)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#873)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#875)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#876)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#877)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#878)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit that referenced this pull request May 24, 2023
…#866) (#879)

Signed-off-by: Ankit Kala <[email protected]>
(cherry picked from commit 3e3787d)

Co-authored-by: Ankit Kala <[email protected]>
ankitkala added a commit to ankitkala/cross-cluster-replication that referenced this pull request May 25, 2023
ankitkala added a commit to ankitkala/cross-cluster-replication that referenced this pull request May 26, 2023
saikaranam-amazon pushed a commit to saikaranam-amazon/cross-cluster-replication-2 that referenced this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants