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
let rel_path = relative_path::RelativePathBuf::from(".parseable.json");
104
+
105
+
let has_parseable_json = obj_store.get_object(&rel_path).await.is_ok();
106
+
107
+
let has_dirs = match obj_store.list_dirs_in_storage().await{
108
+
Ok(dirs) => !dirs.is_empty(),
109
+
Err(_) => false,
110
+
};
111
+
112
+
let has_streams = obj_store.list_streams().await.is_ok();
113
+
114
+
if !has_dirs || has_parseable_json && has_streams {
115
+
Ok(())
116
+
}elseif has_parseable_json && !has_streams {
117
+
Err(ObjectStorageError::Custom(
118
+
"Could not start the server because storage contains stale data from previous deployment, please choose an empty storage and restart the server.\nJoin us on Parseable Slack to report this incident : launchpass.com/parseable"
"Could not start the server because storage contains some stale data, please provide an empty storage and restart the server.\nJoin us on Parseable Slack to report this incident : launchpass.com/parseable".to_owned(),
124
+
))
125
+
}else{
126
+
Err(ObjectStorageError::Custom(
127
+
"Could not start the server because storage contains stale data from previous deployment.\nJoin us on Parseable Slack to report this incident : launchpass.com/parseable"
0 commit comments