Skip to content

Bug: unavailable ErrorChannel #186

Open
@EtienneBruines

Description

Describe the bug

When trying to upsert a record, there seems to be some internal issues with surrealdb.go

Steps to reproduce

Do something that surrealdb.go doesn't really know how to work with:

import (
    "github.com/google/uuid"
)

id, _ := uuid.New()  // id is now a [16]byte internally

_, err = surrealdb.Upsert[struct{}](
    surrealConn,
    models.RecordID{Table: "application", ID: id},
    map[string]interface{}{
	"name":            "my application",
	"organization_id": "abc",
    })

Or something like this:

import "time"

_, err = surrealdb.Upsert[struct{}](
    surrealConn,
    models.RecordID{Table: "application", ID: "app123"},
    map[string]interface{}{
	"name":            "my application",
	"organization_id": "abc",
        "updated":         time.Now(),
    })

This returns (after a while) a timeout error.

In the meanwhile (pretty much instantly), these two are logged on the application (surrealdb.go):

{"time":"2024-11-14T09:39:19.53318052Z","level":"ERROR","msg":"rpc request err Invalid Request"}
{"time":"2024-11-14T09:39:19.533198765Z","level":"ERROR","msg":"unavailable ErrorChannel <nil>"}

Using the full logs on surrealdb, only this is logged at/around that same time:

DEBUG rpc/call: surreal::rpc::response: Process RPC response otel.kind="server" ws.id=ac1fbd7f-9260-4ec9-8e53-94912c8d446d rpc.service="surrealdb"

Expected behaviour

  1. Always have the err be populated instead of timed out.
  2. The upsert statement to work.

SurrealDB version

surreal 2.0.4 for linux on x86_64; surrealdb.go at v0.3.0 184f6bf

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions