Skip to content

Bug: Latest WASM Engine hangs on DEFINE INDEX #547

@ArtifexSystems

Description

@ArtifexSystems

Describe the bug

After upgrading from:

  • "surrealdb": "^2.0.0-alpha.14""^2.0.0-alpha.18"
  • "@surrealdb/wasm": "^2.3.5""^2.6.1"

a previously working startup routine now hangs indefinitely when executing a DEFINE INDEX statement using the WASM IndexedDB engine.

On startup, I execute:

DEFINE TABLE OVERWRITE _client;
DEFINE INDEX OVERWRITE name ON _client FIELDS name UNIQUE;

The DEFINE TABLE completes successfully.

The DEFINE INDEX call never resolves — the promise awaits forever with no error thrown.

This behavior did not occur prior to upgrading.

Steps to reproduce

  1. Use surrealdb@^2.0.0-alpha.18
  2. Use @surrealdb/wasm@^2.6.1
  3. Execute on the browser persistent IndexedDB engine:
DEFINE TABLE OVERWRITE _client;
DEFINE INDEX OVERWRITE name ON _client FIELDS name UNIQUE;
  1. Observe that the DEFINE INDEX statement never resolves.

Expected behaviour

DEFINE INDEX should complete nearly instantly, as it did in previous versions (alpha.14 + wasm 2.3.5).

SurrealDB version

"@surrealdb/wasm": "^2.6.1" - IndexedDB

JavaScript SDK version

1.3.2 - "surrealdb": "^2.0.0-alpha.18"

Contact Details

artifexsystems@gmail.com

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct (repository /surrealdb.js)

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

Metadata

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