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

Revert "Query-level resource usages tracking" #14080

Conversation

ansjcy
Copy link
Member

@ansjcy ansjcy commented Jun 7, 2024

Reverts #13172. This might have made existing tests to be more flaky.

java.lang.AssertionError: Unexpected ShardFailures: [shard [[6aZksFMiT4WtFkh9Ni-mog][test][7]], reason [RemoteTransportException[[node_t2][127.0.0.1:35247][indices:data/read/search[phase/query/id]]]; nested: NotSerializableExceptionWrapper[concurrent_modification_exception: null]; ], cause [NotSerializableExceptionWrapper[concurrent_modification_exception: null]
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1605)
	at java.util.HashMap$EntryIterator.next(HashMap.java:1638)
	at java.util.HashMap$EntryIterator.next(HashMap.java:1636)
	at org.opensearch.common.util.concurrent.ThreadContext$ThreadContextStruct.putResponseHeaders(ThreadContext.java:710)
	at org.opensearch.common.util.concurrent.ThreadContext.lambda$newStoredContext$4(ThreadContext.java:278)
	at org.opensearch.common.util.concurrent.ThreadContext$StoredContext.restore(ThreadContext.java:568)
	at org.opensearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:112)
	at org.opensearch.transport.NativeMessageHandler.handleRequest(NativeMessageHandler.java:279)
	at org.opensearch.transport.NativeMessageHandler.handleMessage(NativeMessageHandler.java:147)
	at org.opensearch.transport.NativeMessageHandler.messageReceived(NativeMessageHandler.java:127)
	at org.opensearch.transport.InboundHandler.messageReceivedFromPipeline(InboundHandler.java:121)
	at org.opensearch.transport.InboundHandler.inboundMessage(InboundHandler.java:113)
	at org.opensearch.transport.TcpTransport.inboundMessage(TcpTransport.java:788)
	at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.forwardFragments(NativeInboundBytesHandler.java:156)
	at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.doHandleBytes(NativeInboundBytesHandler.java:93)
	at org.opensearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:143)
	at org.opensearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:119)
	at org.opensearch.transport.nio.MockNioTransport$MockTcpReadWriteHandler.consumeReads(MockNioTransport.java:343)
	at org.opensearch.nio.SocketChannelContext.handleReadBytes(SocketChannelContext.java:246)
	at org.opensearch.nio.BytesChannelContext.read(BytesChannelContext.java:59)
	at org.opensearch.nio.EventHandler.handleRead(EventHandler.java:152)
	at org.opensearch.transport.nio.TestEventHandler.handleRead(TestEventHandler.java:167)
	at org.opensearch.nio.NioSelector.handleRead(NioSelector.java:438)
	at org.opensearch.nio.NioSelector.processKey(NioSelector.java:264)
	at org.opensearch.nio.NioSelector.singleLoop(NioSelector.java:191)
	at org.opensearch.nio.NioSelector.runLoop(NioSelector.java:148)
	at java.lang.Thread.run(Thread.java:1583)
]]
Expected: <0>
     but: was <1>

We are modifying the response headers in the thread context. We may need to revisit this logic to understand when concurrent modificaiton can happen and how to resolve this.

Copy link
Contributor

github-actions bot commented Jun 7, 2024

❌ Gradle check result for 3877f32:

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ansjcy
Copy link
Member Author

ansjcy commented Jun 7, 2024

since this is one of the important changes for query insights in 2.15, Instead of reverting, let's roll forward to fix this issue.

@ansjcy ansjcy closed this Jun 7, 2024
@ansjcy
Copy link
Member Author

ansjcy commented Jun 7, 2024

PR to fix this issue: #14084

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.

1 participant