tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
11.27k stars 286 forks source link

Use the namespace resolver to extract namespace #1465

Closed avinassh closed 5 months ago

avinassh commented 5 months ago

Storage server requires namespace UUID to operate. In the WALManager we do not have access to the namespace, so this patch extracts the namespace from the db_path

The large diff is due to I moved NamespaceName from libsql-wal to libsql-sys so that libsql-storage also can use it. Or else I could copy the resolver method https://github.com/tursodatabase/libsql/blob/7ebe45b52/libsql-server/src/lib.rs#L672-L684 inside libsql-storage and use that.