neo4j-php-client icon indicating copy to clipboard operation
neo4j-php-client copied to clipboard

No write operations are allowed directly on this database issue

Open AhmedElmaghraby207 opened this issue 3 years ago • 2 comments

Describe the bug No write operations are allowed directly on this database. Writes must pass through the leader. The role of this server is: FOLLOWER

My neo4j connection is

try {
    return $client->writeTransaction(static function (TransactionInterface $tsx) use ($statement) {
        return $tsx->run($statement->getText());
    });
} catch (Exception $e) {
    \Sentry\captureMessage($e->getMessage());
    return $client->writeTransaction(static function (TransactionInterface $tsx) use ($statement) {
        return $tsx->run($statement->getText());
    });
}

package : laudis/neo4j-php-client version: 2.6.1

AhmedElmaghraby207 avatar Aug 29 '22 14:08 AhmedElmaghraby207

@transistive Pls have a look at this

AhmedElmaghraby207 avatar Aug 29 '22 15:08 AhmedElmaghraby207

Hi @AhmedElmaghraby207,

Thank you for reaching out! We actually have tests exactly like this, and they work, so it will be difficult for me to reproduce the bug on my end. Can you explain a little bit more about your neo4j setup? Hopefully I'll be able to check it easier that way.

In the meantime, I'll check if I can find a bug in the code without reproducing it, because it shouldn't happen. I'm still working on the connection pool update atm which is probably where this bug happens, so I might be able to find it that way.

Thanks!

transistive avatar Aug 30 '22 04:08 transistive

Hello @AhmedElmaghraby207, any updates on this with version 2.8.0? I closed the issue for now but feel free to reopen it

transistive avatar Nov 20 '22 12:11 transistive