Skip to content

The api/v1/query endpoint commits server-side transactions when called. #141

Description

@tetious

ArcadeDB Version: 21.10.2-SNAPSHOT (build 88f7d00/1634331428839/main)

OS: docker

Expected behavior

Given the following:

  1. POST to begin/_test
  2. POST to query/_test (with the arcadedb-session-id)
  3. POST to rollback/_test (with the arcadedb-session-id)

The rollback should succeed.

Actual behavior

The rollback fails with Transaction not begun.

Steps to reproduce

It seems that any call to query with a session-id will commit that transaction immediately. So if you do an insert or something, then call query, the rollback will fail and the inserted record will show in the database.

This seems only to impact query. The command endpoint, if used in place of query, works as expected.

You can see this in action via this gist that will run in the Visual Studio Code plugin Rest Client. (should be easy enough to follow even if you don't run it, though!)

https://gist.githubusercontent.com/tetious/e253574e8f1073273f2493313331cdf4/raw/aedeaf8e3bc4b82866e7e44a24b87722a59f4c50/transactions-test.rest

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions