agnesoft / agdb

Agnesoft Graph Database
Apache License 2.0
51 stars 2 forks source link

[server] Database Location Change After agdb_server Restart Causes Data Inaccessibility #1133

Closed pinghe closed 1 week ago

pinghe commented 1 week ago

I have encountered an issue with the user database that affects data accessibility after the database process restarts. Here's a detailed description of the steps and the issue:

Command Sequence Execution:

image

user_login_admin
admin_user_add // Creates a user named user1
user_logout
user_login // user1 logs in
db_add // Creates a database named user1db

image

Directory Check:

Upon checking the directory, user1db is located within the user1 directory. This is as expected. image image image

agdb_server Restart:

After restarting the agdb_server, it is observed that a new user1db is created within the agdb_server_data directory, and the database in the user1 directory is not used. image

Expected Behavior:

The user1db database should retain its location within the user1 directory after the agdb_server restarts.

Actual Behavior:

The agdb_server creates a new instance of user1db in the agdb_server_data directory upon restart, which leads to data inaccessibility.

Steps to Reproduce:

Follow the command sequence as listed above. Verify the location of user1db. Restart the agdb_server and observe the behavior.

Additional Information:

This issue impacts the reliability of the database system as data becomes inaccessible post-restart. I have not made any changes to the default configuration settings.

Could you please look into this and advise on the necessary steps to resolve this issue?

Thank you for your attention to this matter.

Best regards, pinghe

michaelvlach commented 1 week ago

@pinghe Thanks for reporting. This is now fixed. The issue this time was a typo in the variable name used for reloading the databases after restart. As always I have put in tests to guard against such issues in the future. Cheers.