refactor: remove singleton db (#4208)

* refactor: remove singleton db

* chore: fix warning

* chore: fix warning

* chore: update test

* chore: only resotre or backup when init call

* test: fix

* test: fix

* test: fix

* fix: timeout notification

* chore: rename

* chore: rename

* chore: disable test

* chore: remove log

* chore: remove log

* chore: add log

* chore: rename test functions

* chore: add test asset

* chore: bump client api

* chore: disable some tests
This commit is contained in:
Nathan.fooo
2023-12-27 11:42:39 +08:00
committed by GitHub
parent 121ed5a06e
commit df8409178b
110 changed files with 947 additions and 829 deletions

View File

@ -262,6 +262,9 @@ pub enum ErrorCode {
#[error("rocksdb internal error")]
RocksdbInternal = 87,
#[error("Local version not support")]
LocalVersionNotSupport = 88,
}
impl ErrorCode {

View File

@ -59,6 +59,10 @@ impl FlowyError {
self.code == ErrorCode::UserUnauthorized || self.code == ErrorCode::RecordNotFound
}
pub fn is_local_version_not_support(&self) -> bool {
self.code == ErrorCode::LocalVersionNotSupport
}
static_flowy_error!(internal, ErrorCode::Internal);
static_flowy_error!(record_not_found, ErrorCode::RecordNotFound);
static_flowy_error!(workspace_name, ErrorCode::WorkspaceNameInvalid);
@ -105,6 +109,7 @@ impl FlowyError {
static_flowy_error!(collab_not_sync, ErrorCode::CollabDataNotSync);
static_flowy_error!(server_error, ErrorCode::InternalServerError);
static_flowy_error!(not_support, ErrorCode::NotSupportYet);
static_flowy_error!(local_version_not_support, ErrorCode::LocalVersionNotSupport);
}
impl std::convert::From<ErrorCode> for FlowyError {