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

Bug: unavailable ErrorChannel #186

Open
2 tasks done
EtienneBruines opened this issue Nov 14, 2024 · 0 comments
Open
2 tasks done

Bug: unavailable ErrorChannel #186

EtienneBruines opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EtienneBruines
Copy link
Contributor

EtienneBruines commented Nov 14, 2024

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
@EtienneBruines EtienneBruines added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant