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

Fix how resolvers are handled during driver construction #626

Merged
merged 6 commits into from
Jun 26, 2024

Conversation

ali-ince
Copy link
Contributor

@ali-ince ali-ince commented Jun 6, 2024

This PR fixes how multiple URLs are handled when passed to url option during driver creation.

@ali-ince ali-ince requested a review from a team as a code owner June 6, 2024 21:58
@@ -15,21 +15,24 @@ import java.util.concurrent.TimeUnit
import scala.collection.JavaConverters._
import scala.language.implicitConversions
import org.apache.spark.internal.Logging
import org.jetbrains.annotations.TestOnly
Copy link
Contributor

Choose a reason for hiding this comment

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

this addition is probably not intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually added it two public functions on this class, as they were already commented as being public for test access.

@Test
def shouldConstructDriverWithResolver(): Unit = {
val options: java.util.Map[String, String] = new java.util.HashMap[String, String]()
options.put(Neo4jOptions.URL, s"neo4j://localhost.localdomain:8888, bolt://localhost.localdomain:9999, ${server.getBoltUrl}")
Copy link
Contributor

Choose a reason for hiding this comment

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

wait, how does this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, I was just mapping localhost.localdomain:8888 to a set of localhost.localdomain:9999 (which is not accessible) and localhost:XYZ (which should be accessible) - and I expect the driver to establish a connection successfully.

Bu we need a response from drivers team for this - I believe there is a bug around this in the driver.

@ali-ince
Copy link
Contributor Author

waiting for a driver fix for this one.

@ali-ince ali-ince merged commit 29b77b4 into neo4j:5.0 Jun 26, 2024
19 checks passed
@ali-ince ali-ince deleted the fix-resolvers branch June 26, 2024 08:57
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