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

Move ImmutableOpenMap usage to j.u.Map #955

Merged

Conversation

junqiu-lei
Copy link
Member

@junqiu-lei junqiu-lei commented Jul 7, 2023

Description

Issues Resolved

#957

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as 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.

vamshin
vamshin previously approved these changes Jul 7, 2023
Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@junqiu-lei junqiu-lei force-pushed the fix_ImmutableOpenMap_usage branch 4 times, most recently from 7604efc to 9508fba Compare July 7, 2023 23:13
vamshin
vamshin previously approved these changes Jul 8, 2023
Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@junqiu-lei
Copy link
Member Author

CI failed:

> Task :integTest
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0

REPRODUCE WITH: ./gradlew ':integTest' --tests "org.opensearch.knn.index.FaissIT.testEndToEnd_fromModel" -Dtests.seed=BA64F5A0A47B5FD5 -Dtests.security.manager=false -Dtests.locale=sl -Dtests.timezone=GMT -Druntime.java=17

org.opensearch.knn.index.FaissIT > testEndToEnd_fromModel FAILED
    org.opensearch.client.ResponseException: method [GET], host [http://[::1]:46745], URI [/_plugins/_knn/models/test-model], status line [HTTP/1.1 400 Bad Request]
    {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"model ID cannot be empty"}],"type":"illegal_argument_exception","reason":"model ID cannot be empty"},"status":400}
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
        at app//org.opensearch.knn.KNNRestTestCase.getModel(KNNRestTestCase.java:1131)
        at app//org.opensearch.knn.KNNRestTestCase.assertTrainingSucceeds(KNNRestTestCase.java:1143)
        at app//org.opensearch.knn.index.FaissIT.testEndToEnd_fromModel(FaissIT.java:243)

    org.opensearch.client.ResponseException: method [GET], host [http://[::1]:46745], URI [/_plugins/_knn/models/test-model], status line [HTTP/1.1 400 Bad Request]
    {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"model ID cannot be empty"}],"type":"illegal_argument_exception","reason":"model ID cannot be empty"},"status":400}
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
        at app//org.opensearch.knn.ODFERestTestCase.deleteModels(ODFERestTestCase.java:223)
        at app//org.opensearch.knn.ODFERestTestCase.wipeIndexContent(ODFERestTestCase.java:201)
        at app//org.opensearch.knn.ODFERestTestCase.wipeAllODFEIndices(ODFERestTestCase.java:186)
        at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

@navneet1v
Copy link
Collaborator

@junqiu-lei please check why this test: Build and Test k-NN / Build and Test k-NN Plugin (17, ubuntu-latest) (pull_request) is failing

Signed-off-by: Junqiu Lei <junqiu@amazon.com>
@junqiu-lei
Copy link
Member Author

@junqiu-lei junqiu-lei requested review from navneet1v and vamshin July 8, 2023 18:13
@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Merging #955 (2943e01) into 2.x (f11f1f1) will not change coverage.
The diff coverage is 60.00%.

@@            Coverage Diff            @@
##                2.x     #955   +/-   ##
=========================================
  Coverage     85.13%   85.13%           
  Complexity     1088     1088           
=========================================
  Files           152      152           
  Lines          4414     4414           
  Branches        392      392           
=========================================
  Hits           3758     3758           
  Misses          479      479           
  Partials        177      177           
Impacted Files Coverage Δ
...xception/DeleteModelWhenInTrainStateException.java 100.00% <ø> (ø)
...rg/opensearch/knn/index/query/KNNQueryBuilder.java 84.21% <0.00%> (ø)
...search/knn/plugin/rest/RestDeleteModelHandler.java 77.77% <0.00%> (ø)
...pensearch/knn/plugin/rest/RestGetModelHandler.java 77.77% <0.00%> (ø)
...earch/knn/plugin/transport/DeleteModelRequest.java 84.61% <0.00%> (ø)
...pensearch/knn/plugin/rest/RestKNNStatsHandler.java 90.00% <100.00%> (ø)
...ensearch/knn/plugin/rest/RestKNNWarmupHandler.java 100.00% <100.00%> (ø)
...in/transport/TrainingJobRouterTransportAction.java 80.00% <100.00%> (ø)
.../java/org/opensearch/knn/training/TrainingJob.java 87.50% <100.00%> (ø)

@junqiu-lei
Copy link
Member Author

The Build and Test k-NN Plugin (11, macos-latest) failed error come from opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT:

» ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [integTest-0] fatal error in thread [opensearch[integTest-0][generic][T#1]], exiting
»  java.lang.AbstractMethodError: Receiver class org.opensearch.knn.plugin.KNNPlugin$$Lambda$2050/0x0000000800886c40 does not define or inherit an implementation of the resolved method 'abstract java.lang.Object read(org.opensearch.core.common.io.stream.BaseStreamInput)' of interface org.opensearch.core.common.io.stream.BaseWriteable$Reader.
»  	at org.opensearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:63) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.NamedDiffableValueSerializer.read(NamedDiffableValueSerializer.java:55) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.NamedDiffableValueSerializer.read(NamedDiffableValueSerializer.java:45) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.DiffableUtils$MapDiff.<init>(DiffableUtils.java:239) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.DiffableUtils$JdkMapDiff.<init>(DiffableUtils.java:137) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.DiffableUtils.readJdkMapDiff(DiffableUtils.java:112) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.metadata.Metadata$MetadataDiff.<init>(Metadata.java:1017) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.metadata.Metadata.readDiffFrom(Metadata.java:948) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.ClusterState$ClusterStateDiff.<init>(ClusterState.java:845) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.ClusterState.readDiffFrom(ClusterState.java:752) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.coordination.PublicationTransportHandler.handleIncomingPublishRequest(PublicationTransportHandler.java:189) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.cluster.coordination.PublicationTransportHandler.lambda$new$0(PublicationTransportHandler.java:117) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:106) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.transport.TransportService$8.doRun(TransportService.java:1091) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:854) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52) ~[opensearch-2.9.0-SNAPSHOT.jar:2.9.0-SNAPSHOT]
»  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
»  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
»  	at java.lang.Thread.run(Thread.java:829) [?:?]
»   ↓ last 40 non error or warning messages from /Users/runner/work/k-NN/k-NN/build/testclusters/integTest-0/logs/opensearch.stdout.log ↓

@junqiu-lei junqiu-lei merged commit ab5f3cc into opensearch-project:2.x Jul 10, 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