agnesoft / agdb

Agnesoft Graph Database
https://agdb.vercel.app
Apache License 2.0
55 stars 3 forks source link

[server] ServerError on Second Launch of agdb_server: Index 'username' already exists #1283

Closed pinghe closed 1 month ago

pinghe commented 1 month ago

Description:

I have built and started agdb_server from the latest codebase successfully. However, when I attempt to launch it for the second time, I encounter a server error. The error message is as follows:

Error: ServerError { description: "Index 'username' already exists", status: 500 }

Steps to Reproduce:

Launch agdb_server for the first time. Shut down the server after it has started successfully. Attempt to restart agdb_server.

Expected Behavior:

The server should start up normally without any errors.

Actual Behavior:

Upon relaunch, the server throws an error indicating that the index 'username' already exists.

michaelvlach commented 1 month ago

Hi, thanks for the report, what version of the server are you using? I cannot reproduce this on the 0.8.2 from crates.io nor latest on main. This must have been fixed in one of the earlier versions. My steps:

./agdb_server
ctrl+c
./agdb_server

Do you run any additional actions/commands in between the runs? Creating users etc.? It should not make a difference to this but just to confirm I have not msised anything.

pinghe commented 1 month ago

Apologies, it turns out to be an issue with my code. Sorry for the inconvenience caused. I will close this issue.

michaelvlach commented 1 month ago

Absolutely no worries, better a false positive than missing a genuine issue. I am glad you have resolved it!