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

Add more information to NoNodeAvailableException and AllNodesFailedException #350

Draft
wants to merge 1 commit into
base: scylla-4.x
Choose a base branch
from

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Sep 26, 2024

Closes #368

Before

NoNodeAvailableException

 NoNodeAvailableException(showing first 0 nodes):
com.datastax.oss.driver.api.core.NoNodeAvailableException: No node was available to execute the query
at com.datastax.oss.driver.api.core.NoNodeAvailableException.copy(NoNodeAvailableException.java:56)
at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:151)
at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:55)
at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:32)
at com.datastax.oss.driver.internal.core.session.DefaultSession.execute(DefaultSession.java:239)
at datadog.trace.instrumentation.datastax.cassandra4.TracingSession.wrapSyncRequest(TracingSession.java:65)
at datadog.trace.instrumentation.datastax.cassandra4.TracingSession.execute(TracingSession.java:47)
at com.datastax.oss.driver.api.core.cql.SyncCqlSession.execute(SyncCqlSession.java:56)
at com.datastax.oss.driver.internal.mapper.DaoBase.execute(DaoBase.java:188)

AllNodesFailedException

After

NoNodeAvailableException

com.datastax.oss.driver.api.core.NoNodeAvailableException: No node was available to execute the query. Query Plan: com.datastax.oss.driver.internal.core.util.collection.DebugQueryPlan(plan: com.datastax.oss.driver.internal.core.util.collection.EmptyQueryPlan(inQueue: [], itemsPulled: []), policy: DefaultLoadBalancingPolicyDebugInfo{localDc: dc1, localRack: null, liveNodes: SingleDcNodeSetInfo(dc:dc1, dcs: [dc1], nodes: []), replicas: null, defaultConsistencyLevel: LOCAL_ONE, allowDcFailoverForLocalCl: false, maxNodesPerRemoteDc: 0, responseTimes: {Node(endPoint=test.cluster.fake:9042, hostId=a2e2a335-7cf6-4693-a3d6-898e2496c2ee, hashCode=9e10e5a)=[20538401028950]}, upTimes: {}, avoidSlowReplicas: true}, localPlan: com.datastax.oss.driver.internal.core.loadbalancing.nodeset.LazyCopyQueryPlan(inQueue: [], itemsPulled: []))

	at com.datastax.oss.driver.api.core.NoNodeAvailableException.copy(NoNodeAvailableException.java:56)
	at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:151)
	at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:55)
	at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:32)
	at com.datastax.oss.driver.internal.core.session.DefaultSession.execute(DefaultSession.java:239)
	at com.datastax.oss.driver.api.core.cql.SyncCqlSession.execute(SyncCqlSession.java:56)
	at com.datastax.oss.driver.api.core.cql.SyncCqlSession.execute(SyncCqlSession.java:80)
	at com.datastax.oss.driver.core.resolver.MockResolverIT.should_connect_with_mocked_hostname(MockResolverIT.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)

AllNodesFailedException

@dkropachev dkropachev force-pushed the dk/better-excution-plan-exceptions-2 branch 3 times, most recently from 18670c9 to bac5ad1 Compare September 26, 2024 14:55
…ception

Sometimes users see these exceptions on production in elusive rare
cases.
Since it is PROD it is imposible to enable DEBUG logs.
In order to debug these cases we need these errors to contain
all the information that can help to investigate what is happening.
This information needs to be as recent as it is possible and be
collected as close as possible to the place when it is being read by
driver.
@dkropachev dkropachev force-pushed the dk/better-excution-plan-exceptions-2 branch from bac5ad1 to b7b7c97 Compare September 26, 2024 15:19
@roydahan
Copy link
Collaborator

@dkropachev are we going to do it only for 4.x?

@dkropachev
Copy link
Collaborator Author

dkropachev commented Sep 30, 2024

@dkropachev are we going to do it only for 4.x?

For now, we are going to work it out with Disney, and based on that experience complete this PR and then propagate changes to 3.x

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.

2 participants