diff --git a/store.go b/store.go index 89905ae..d856f23 100644 --- a/store.go +++ b/store.go @@ -134,8 +134,6 @@ func WithPurgeInterval(interval time.Duration) StoreOption { } // Usage example: `storeInstance, err := store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}, PurgeInterval: 20 * time.Millisecond})` -// NewConfigured also scans `.core/state` for leftover `.duckdb` workspace files -// so orphan recovery can happen before the first explicit recovery call. func NewConfigured(config StoreConfig) (*Store, error) { return newStoreFromConfig("store.NewConfigured", config) } @@ -157,14 +155,11 @@ func newStoreFromConfig(operation string, config StoreConfig) (*Store, error) { storeInstance.purgeInterval = config.PurgeInterval } - _ = discoverOrphanWorkspacePaths(defaultWorkspaceStateDirectory) storeInstance.startBackgroundPurge() return storeInstance, nil } // Usage example: `storeInstance, err := store.New("/tmp/go-store.db", store.WithJournal("http://127.0.0.1:8086", "core", "events"))` -// New scans `.core/state` for leftover `.duckdb` workspace files before the -// store starts its background purge loop. func New(databasePath string, options ...StoreOption) (*Store, error) { config := StoreConfig{DatabasePath: databasePath} for _, option := range options {