SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

[STABILITY] Migrate db log paths(waiting folder proposal)

Open mamcx opened this issue 1 year ago • 3 comments

Description of Changes

Closes #581

Stores module logs in $STDB_PATH/database_instances

API and ABI breaking changes

If this is an API or ABI breaking change, please apply the corresponding GitHub label.

Expected complexity level and risk

1

Testing

Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected!

  • [x] Manually inspect the logs created in the correct path.

mamcx avatar Jun 13 '24 16:06 mamcx

The full context got lost it seems: the distinction control_node / worker_node still exists in standalone.

We can either:

  • store things in worker_node even if it does not make a lot of sense, or
  • determine the instances root by a parametrized function relative to STDB_ROOT

I’m more in favor of the latter, so as to not have hardcoded stdb_path(“some/path”) all over the place.

kim avatar Jun 13 '24 17:06 kim

Ok, so I need to differentiate by edition?

mamcx avatar Jun 13 '24 17:06 mamcx

I would propose to simply retire the worker_node directory. We would then have:

STDB_PATH
| -- conf
| -- config.toml
| -- logs
| -- database_instances
|     `-- <address>
|           `-- <instance_id>
|                 | -- database
|                 | -- module_logs
|                 `-- scheduler 
`-- wasmtime_cache

Standalone can keep using control_node then.

kim avatar Jun 14 '24 06:06 kim

Closed, will be made by #1657

mamcx avatar Sep 19 '24 20:09 mamcx