mirror of
https://gitee.com/openharmony/distributeddatamgr_relational_store
synced 2024-11-27 01:01:02 +00:00
!1764 【RDB】sqlite双写补充打点上报场景
Merge pull request !1764 from linzhuobin1/dw-dfx
This commit is contained in:
commit
7d342ca7da
@ -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