You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add option to use local filesystem for storage (#217)
This PR enables Parseable server to accept additional
arguments ( drive or s3) to switch between storage.
Local filesystem behaves like an object storage through
implementation of ObjectStorage trait. All
methods of LocalFS are implemented using tokio::fs
Configuration provided on runtime is used to select a
storage provider. The storage object is handled as
trait objects hence the requirement of Sized on some
methods. Calls to S3 are replaced with appropriate methods.
// actix server finished .. stop other threads and stop the server
87
-
s3sync_inbox.send(()).unwrap_or(());
87
+
remote_sync_inbox.send(()).unwrap_or(());
88
88
localsync_inbox.send(()).unwrap_or(());
89
89
localsync_handler.join().unwrap_or(());
90
-
s3sync_handler.join().unwrap_or(());
90
+
remote_sync_handler.join().unwrap_or(());
91
91
return e
92
92
},
93
93
_ = &mut localsync_outbox => {
94
94
// crash the server if localsync fails for any reason
95
95
// panic!("Local Sync thread died. Server will fail now!")
96
96
returnErr(anyhow::Error::msg("Failed to sync local data to disc. This can happen due to critical error in disc or environment. Please restart the Parseable server.\n\nJoin us on Parseable Slack if the issue persists after restart : https://launchpass.com/parseable"))
97
97
},
98
-
_ = &muts3sync_outbox => {
99
-
// s3sync failed, this is recoverable by just starting s3sync thread again
0 commit comments