majensen / perlbolt

Neo4j server agent using Bolt protocol
Apache License 2.0
4 stars 2 forks source link

Bolt v5 support #54

Open johannessen opened 1 year ago

johannessen commented 1 year ago

Re https://github.com/majensen/perlbolt/issues/50#issuecomment-1512424819:

Have a try of https://github.com/majensen/perlbolt/tree/v0.5000rc (in feat-v5.0) for element ids in Nodes and Relationships.

I finally looked into this today. Sorry it took so long.

However, I can’t get the feat-v5.0 branch to connect properly using Bolt v5.

git checkout v0.5000rc
perl Makefile.PL
make
perl -Iblib/arch -Iblib/lib -MNeo4j::Bolt -E "say Neo4j::Bolt->connect(...)->protocol_version"

Tried with Neo4j 5.1, 5.3, 5.6; these always yield a Bolt version 4.0 connection. Then tried with Neo4j 5.9, got a segfault (libneo4j-omni#3). Then tried Neo4j 5.8, for which perlbolt claims to get a Bolt version 5.0 connection – except that Bolt 5.0 isn’t declared as supported by the client, so I don’t see how that is even possible.

With that so-called “Bolt 5.0” connection to Neo4j 5.8, make test fails.

Trying to run any query manually fails as well, with a “… session in the AUTHENTICATION state” message. (Yes, the credentials are correct.)

$ perl -Iblib/arch -Iblib/lib -MNeo4j::Bolt -E "Neo4j::Bolt->set_log_level('TRACE'); Neo4j::Bolt->connect(...)->run_query('RETURN 1')"
...
TRACE [results]: FAILURE in 0x7f9a6855b940 (response to RUN): {code:"Neo.ClientError.Request.Invalid",message:"Message 'RunMessage{bookmarks=[], txTimeout=null, accessMode=WRITE, txMetadata=null, databaseName='neo4j', impersonatedUser='null', notificationsConfig=Default, statement='RETURN 1', params=Map{}}' cannot be handled by a session in the AUTHENTICATION state."}

I have Neo4j::Client 0.52, which is the latest version. Trying 0.51 or 0.50 didn’t seem to change anything.

Am I missing something obvious here?

johannessen commented 9 months ago

@majensen Mark – my sense is that the cause of this issue is inside the libneo4j-client codebase, with which I’m entirely unfamiliar. May I assign this one to you?

In the meantime, perhaps we want to think about disabling Bolt v5 support in the lib entirely for the time being (by adjusting supported_versions). Right now, the Neo4j::Client version you get from CPAN fails pretty badly on Neo4j 5.

majensen commented 9 months ago

Hey Arne- yes, there is def an issue with the version selection in libneo. I've noticed it myself using the cli client. Maybe I can look into it during the next couple of days (holidays here). In the meantime it's reasonable to limit to >=4.

johannessen commented 9 months ago

Right, I forgot. Happy Thanksgiving! 🙂

johannessen commented 5 months ago

@majensen Hey Mark, I'm working on an update to Neo4j::Driver that would benefit from Bolt v5 support being available on CPAN. It seems that the effort to release Perl support for Bolt v5 is currently stalled.

Fixes for the minor issues that had been blocking a working release are in https://github.com/majensen/perlbolt/pull/59 and in https://github.com/majensen/libneo4j-omni/pull/9.

Additionally, the submodule in the neoclient repository will need to be updated after the libneo4j-omni fix has been applied. https://github.com/majensen/neoclient/pull/4 doesn't yet include it.

What else can I do to help?

majensen commented 5 months ago

Hey @johannessen - it's obviously been really tough for me to get back over to this. I'll have to give it a weekend at least, so it will prob be May before I can look at it.

johannessen commented 5 months ago

Sure, thanks for the heads up.

For what it’s worth, should you be willing to grant me co-maintainer privileges on PAUSE, I could handle the release for you. Would save you the workload. But no pressure – if you prefer to verify the changes first, that would of course be appreciated. Code review is always good.

johannessen commented 3 weeks ago

Apparently it’s CPAN Day. Any progress on getting this released? 🙂