1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -32,7 +32,6 @@
namespace WriteEngine
{
/** @brief Encapsulates logic to confirm and finalize (or abort) changes
* to an HDFS db file. Class should only be used for HDFS db files.
*
@ -46,92 +45,83 @@ namespace WriteEngine
*/
class ConfirmHdfsDbFile
{
public:
EXPORT ConfirmHdfsDbFile( );
EXPORT ~ConfirmHdfsDbFile( );
public:
EXPORT ConfirmHdfsDbFile();
EXPORT ~ConfirmHdfsDbFile();
/** @brief Confirm changes to the specified db file
* @param backUpFileType Backup file type to confirm. Types:
* "rlc" - reallocated chunk file
* "tmp" - updated db file
* @param filename Name of db file to be confirmed.
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int confirmDbFileChange( const std::string& backUpFileType,
const std::string& filename,
std::string& errMsg ) const;
/** @brief Confirm changes to the specified db file
* @param backUpFileType Backup file type to confirm. Types:
* "rlc" - reallocated chunk file
* "tmp" - updated db file
* @param filename Name of db file to be confirmed.
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int confirmDbFileChange(const std::string& backUpFileType, const std::string& filename,
std::string& errMsg) const;
/** @brief Finalize changes to the specified db file
*
* If success flag is true:
* The old version of the db file is deleted.
* If success flag is false:
* The old version is retained, and any temporary file with pending
* changes is deleted.
*
* @param backUpFileType Backup file type to finalize. Types:
* "rlc" - reallocated chunk file
* "tmp" - updated db file
* @param filename Name of db file to be finalized.
* @param success Final success/fail status of db file changes
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int endDbFileChange( const std::string& backUpFileType,
const std::string& filename,
bool success,
std::string& errMsg ) const;
/** @brief Finalize changes to the specified db file
*
* If success flag is true:
* The old version of the db file is deleted.
* If success flag is false:
* The old version is retained, and any temporary file with pending
* changes is deleted.
*
* @param backUpFileType Backup file type to finalize. Types:
* "rlc" - reallocated chunk file
* "tmp" - updated db file
* @param filename Name of db file to be finalized.
* @param success Final success/fail status of db file changes
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int endDbFileChange(const std::string& backUpFileType, const std::string& filename, bool success,
std::string& errMsg) const;
/** @brief Confirm changes to the db files modified for tableOID
*
* The HWM db file for each DBRoot, as listed in the bulk rollback meta
* data file (for the specified tableOID), is confirmed.
*
* @param tableOID Table that has changes to be confirmed
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int confirmDbFileListFromMetaFile( OID tableOID,
std::string& errMsg );
/** @brief Confirm changes to the db files modified for tableOID
*
* The HWM db file for each DBRoot, as listed in the bulk rollback meta
* data file (for the specified tableOID), is confirmed.
*
* @param tableOID Table that has changes to be confirmed
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int confirmDbFileListFromMetaFile(OID tableOID, std::string& errMsg);
/** @brief Finalize changes to the db files modified for tableOID
*
* The HWM db file for each DBRoot, as listed in the bulk rollback meta
* data file (for the specified tableOID), is finalized.
*
* If success flag is true:
* The old version of the db files are deleted.
* If success flag is false:
* The old versions are retained, and any temporary files with pending
* changes are deleted.
*
* @param tableOID Table that has changes to be confirmed
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int endDbFileListFromMetaFile( OID tableOID,
bool success,
std::string& errMsg );
/** @brief Finalize changes to the db files modified for tableOID
*
* The HWM db file for each DBRoot, as listed in the bulk rollback meta
* data file (for the specified tableOID), is finalized.
*
* If success flag is true:
* The old version of the db files are deleted.
* If success flag is false:
* The old versions are retained, and any temporary files with pending
* changes are deleted.
*
* @param tableOID Table that has changes to be confirmed
* @param errMsg (out) Error msg associated with a bad return code
* @return Returns NO_ERROR if call is successful
*/
EXPORT int endDbFileListFromMetaFile(OID tableOID, bool success, std::string& errMsg);
private:
void openMetaDataFile( OID tableOID,
uint16_t dbRoot,
std::istringstream& metaDataStream );
private:
void openMetaDataFile(OID tableOID, uint16_t dbRoot, std::istringstream& metaDataStream);
void confirmDbFiles( std::istringstream& metaDataStream ) const;
void confirmColumnDbFile( const char* inBuf ) const;
void confirmDctnryStoreDbFile( const char* inBuf ) const;
void confirmDbFiles(std::istringstream& metaDataStream) const;
void confirmColumnDbFile(const char* inBuf) const;
void confirmDctnryStoreDbFile(const char* inBuf) const;
void endDbFiles( std::istringstream& metaDataStream, bool success ) const;
void endColumnDbFile( const char* inBuf, bool success ) const;
void endDctnryStoreDbFile( const char* inBuf, bool success ) const;
void endDbFiles(std::istringstream& metaDataStream, bool success) const;
void endColumnDbFile(const char* inBuf, bool success) const;
void endDctnryStoreDbFile(const char* inBuf, bool success) const;
idbdatafile::IDBFileSystem& fFs;
std::string fMetaFileName;
idbdatafile::IDBFileSystem& fFs;
std::string fMetaFileName;
};
} // end of namespace
} // namespace WriteEngine
#undef EXPORT