mirror of
https://gitee.com/openharmony/distributeddatamgr_relational_store
synced 2024-11-23 07:00:41 +00:00
IssueNo:
Description:sqlite双写补充打点上报场景 Sig: SIG_DataManagement Feature or Bugfix: Binary Source:No/Yes TDD:Pass/Fail/NA XTS:Pass/Fail/NA Pretest:Pass/Fail/NA Signed-off-by: linzhuobin <linzhuobin1@huawei.com>
This commit is contained in:
parent
ea0b93c5b0
commit
b790f74e0b
@ -168,6 +168,7 @@ std::pair<int32_t, std::shared_ptr<SqliteConnection>> SqliteConnection::CreateSl
|
||||
(!isSlaveExist || isSlaveLockExist || hasFailure || walOverLimit))) {
|
||||
if (walOverLimit) {
|
||||
SqliteUtils::SetSlaveInvalid(config_.GetPath());
|
||||
Reportor::Report(Reportor::Create(config, E_SQLITE_ERROR, "ErrorType: slaveWalOverLimit"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -1394,6 +1395,7 @@ int SqliteConnection::SqliteNativeBackup(bool isRestore, SlaveStatus &curStatus)
|
||||
(void)SqliteConnection::Delete(slaveConfig.GetPath());
|
||||
}
|
||||
curStatus = SlaveStatus::BACKUP_INTERRUPT;
|
||||
Reportor::Report(Reportor::Create(slaveConfig, SQLiteError::ErrNo(rc), "ErrorType: slaveBackupInterrupt"));
|
||||
}
|
||||
return rc == E_CANCEL ? E_CANCEL : SQLiteError::ErrNo(rc);
|
||||
}
|
||||
|
@ -206,6 +206,8 @@ int SqliteStatement::Prepare(const std::string &sql)
|
||||
if (errCode != E_OK) {
|
||||
LOG_WARN("slave prepare Error:%{public}d", errCode);
|
||||
SqliteUtils::SetSlaveInvalid(config_->GetPath());
|
||||
RdbStoreConfig slaveConfig(SqliteUtils::GetSlavePath(config_->GetPath()));
|
||||
Reportor::ReportFault(Reportor::Create(slaveConfig, errCode, "ErrorType: slavePrepareErr"));
|
||||
}
|
||||
}
|
||||
return E_OK;
|
||||
@ -247,6 +249,8 @@ int SqliteStatement::Bind(const std::vector<ValueObject> &args)
|
||||
if (errCode != E_OK) {
|
||||
LOG_ERROR("slave bind error:%{public}d", errCode);
|
||||
SqliteUtils::SetSlaveInvalid(config_->GetPath());
|
||||
RdbStoreConfig slaveConfig(SqliteUtils::GetSlavePath(config_->GetPath()));
|
||||
Reportor::Report(Reportor::Create(slaveConfig, errCode, "ErrorType: slaveBindErr"));
|
||||
}
|
||||
}
|
||||
return E_OK;
|
||||
@ -387,6 +391,8 @@ int32_t SqliteStatement::Execute(const std::vector<std::reference_wrapper<ValueO
|
||||
LOG_ERROR("slave execute error:%{public}d, sql is %{public}s, errno %{public}d",
|
||||
errCode, sql_.c_str(), errno);
|
||||
SqliteUtils::SetSlaveInvalid(config_->GetPath());
|
||||
RdbStoreConfig slaveConfig(SqliteUtils::GetSlavePath(config_->GetPath()));
|
||||
Reportor::Report(Reportor::Create(slaveConfig, errCode, "ErrorType: slaveExecErr"));
|
||||
}
|
||||
}
|
||||
return E_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user