Skip to content

HA: since #10040 a Cypher CREATE with a new label inside a client transaction on a follower is refused instead of forwarded #10067

Closed

Description

@robfrank

Found while fixing #10060.

Since #10047 (issue #10040), a write sent to a follower inside a transaction the client opened (Bolt BEGIN, Postgres BEGIN, an HTTP session) runs in that transaction on the follower instead of being forwarded to the leader. RaftReplicatedDatabase.runsInTheClientTransaction keeps forwarding statements the analyzer reports as DDL, but an openCypher CREATE (n:NewLabel ...) / MERGE whose label has no type yet is not DDL to the analyzer: it creates the type implicitly while executing. On a follower that is a schema change, so the statement is now refused with ServerIsNotTheLeaderException("Changes to the schema must be executed on the leader server").

Before #10047 the same statement was forwarded and succeeded. This is what turned Issue9870BoltFollowerLeaderRefusalIT.aWriteInAnExplicitTransactionOnAFollowerIsAnsweredNotALeaderNamingTheLeader red (#10060): the explicit transaction now hits the schema refusal rather than the forwarding refusal the test injected. #10060 only fixed the leader address that refusal names.

Effect on a correctly configured cluster: a routing (neo4j://) driver gets NotALeader and re-runs the transaction on the leader, so it recovers; a direct bolt:// / Postgres / HTTP-session client on a follower gets an error for a write that used to work, the first time it uses a new label inside an explicit transaction.

To decide: is this the intended trade of #10040 (document it: create types first, or outside the transaction), or should a statement that would create a type be detected and handled (refused up front with a clearer message, or forwarded)?

Reproduce: Issue10060SchemaRefusalNamesTheLeaderIT.aSchemaRefusalOnAFollowerOfAWellConfiguredClusterNamesTheLeadersHttpAddress (ha-raft) drives exactly this on a well-configured cluster.

Activity

  1. added this to the 26.11.1 milestone on Oct 15, 2026
  2. added
    haHigh availability / replication (Raft)
    on Oct 15, 2026
  3. added
    in progressThe team is actively working on this issue
    on Oct 15, 2026
  4. self-assigned this
    on Oct 15, 2026
  5. added 6 commits that reference this issue on Oct 15, 2026
  6. 1 remaining item

  7. added 2 commits that reference this issue on Oct 15, 2026
  8. lvca commented on Oct 15, 2026

    @lvca
    Member

    Fixed in #10078, released in 26.10.2.

    A Cypher CREATE or MERGE with a new label or relationship type, inside a transaction the client opened (Bolt BEGIN, an HTTP session) on a follower, was refused: creating the type is a schema change a follower cannot make.

    The follower now asks the leader to create the missing type and carries on with the data write in the client's own transaction.

    • A user without schema permission is still refused.
    • Two clients creating the same new label through different followers both succeed.
    • If another schema change lands in between, the statement fails at once with a retryable error and the retry goes through.
    • CREATE ... TYPE ... IF NOT EXISTS now also holds against a concurrent creation.

    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  9. removed
    in progressThe team is actively working on this issue
    on Oct 15, 2026
  10. added 9 commits that reference this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

boltBolt wire protocol modulebughaHigh availability / replication (Raft)opencypherpostgresql-wireseverity:minorCosmetic, documentation, edge case, or a workaround exists

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions