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: Create<T> throws timeout exception or blocks thread forever #155

Open
2 tasks done
frxncyyy opened this issue Nov 26, 2024 · 0 comments
Open
2 tasks done

Bug: Create<T> throws timeout exception or blocks thread forever #155

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

Comments

@frxncyyy
Copy link

frxncyyy commented Nov 26, 2024

Describe the bug

I am trying to use SurrealDbClient.Create and sometimes it happens to create the record. Sometimes not, either way it throws an exception (OperationCancelledException/TaskCancelledException) or infinitely waits.

Steps to reproduce

  1. Create a record in c#.
    public class Session : Record { public required long SessionKey {get;set;} }
  2. Create it
var session = new Session  { SessionKey = RandomHelper.UniqueSessionKey };
session = await _client.Create("sessions", session); //wait infinitely, or throw exception.

Expected behaviour

The record gets created and peacefully continues executing the thread.

SurrealDB version

2.1.0 for windows on x86_64

Package version(s)

[net8.0]:
Top-level Package Requested Resolved

SurrealDb.Net 0.6.0 0.6.0

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

Update

This seems like this happens when a method that calls the Create isn't awaited.

@frxncyyy frxncyyy added the bug Something isn't working label Nov 26, 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