From 41b20a9435c5199c949e0cbc4a675fc277c70295 Mon Sep 17 00:00:00 2001 From: Evgeny Malygin Date: Fri, 6 Dec 2024 00:59:16 +0000 Subject: [PATCH] Refine Signed-off-by: Evgeny Malygin --- src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp | 12 ++++++------ src/groups/mqb/mqbc/mqbc_storagemanager.cpp | 12 ++++++------ src/groups/mqb/mqbs/mqbs_filestoreprotocol.h | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp b/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp index 921abe077..ebdbff631 100644 --- a/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp +++ b/src/groups/mqb/mqbblp/mqbblp_storagemanager.cpp @@ -1334,8 +1334,8 @@ int StorageManager::start(bsl::ostream& errorDescription) d_clusterConfig.partitionConfig(); // Validate file size limits before checking the available disk space - if (partitionCfg.maxDataFileSize() > - mqbs::FileStoreProtocol::k_MAX_DATA_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_DATA_FILE_SIZE_HARD < + partitionCfg.maxDataFileSize()) { BALL_LOG_ERROR << "Configured maxDataFileSize (" << partitionCfg.maxDataFileSize() << ") exceeds the protocol limit (" @@ -1344,8 +1344,8 @@ int StorageManager::start(bsl::ostream& errorDescription) return rc_OVERFLOW_MAX_DATA_FILE_SIZE; } - if (partitionCfg.maxJournalFileSize() > - mqbs::FileStoreProtocol::k_MAX_JOURNAL_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_JOURNAL_FILE_SIZE_HARD < + partitionCfg.maxJournalFileSize()) { BALL_LOG_ERROR << "Configured maxJournalFileSize (" << partitionCfg.maxJournalFileSize() << ") exceeds the protocol limit (" @@ -1354,8 +1354,8 @@ int StorageManager::start(bsl::ostream& errorDescription) return rc_OVERFLOW_MAX_JOURNAL_FILE_SIZE; } - if (partitionCfg.maxQlistFileSize() > - mqbs::FileStoreProtocol::k_MAX_QLIST_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_QLIST_FILE_SIZE_HARD < + partitionCfg.maxQlistFileSize()) { BALL_LOG_ERROR << "Configured maxQlistFileSize (" << partitionCfg.maxQlistFileSize() << ") exceeds the protocol limit (" diff --git a/src/groups/mqb/mqbc/mqbc_storagemanager.cpp b/src/groups/mqb/mqbc/mqbc_storagemanager.cpp index ee66851cc..d2b2771be 100644 --- a/src/groups/mqb/mqbc/mqbc_storagemanager.cpp +++ b/src/groups/mqb/mqbc/mqbc_storagemanager.cpp @@ -3480,8 +3480,8 @@ int StorageManager::start(bsl::ostream& errorDescription) d_clusterConfig.partitionConfig(); // Validate file size limits before checking the available disk space - if (partitionCfg.maxDataFileSize() > - mqbs::FileStoreProtocol::k_MAX_DATA_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_DATA_FILE_SIZE_HARD < + partitionCfg.maxDataFileSize()) { BALL_LOG_ERROR << "Configured maxDataFileSize (" << partitionCfg.maxDataFileSize() << ") exceeds the protocol limit (" @@ -3490,8 +3490,8 @@ int StorageManager::start(bsl::ostream& errorDescription) return rc_OVERFLOW_MAX_DATA_FILE_SIZE; } - if (partitionCfg.maxJournalFileSize() > - mqbs::FileStoreProtocol::k_MAX_JOURNAL_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_JOURNAL_FILE_SIZE_HARD < + partitionCfg.maxJournalFileSize()) { BALL_LOG_ERROR << "Configured maxJournalFileSize (" << partitionCfg.maxJournalFileSize() << ") exceeds the protocol limit (" @@ -3500,8 +3500,8 @@ int StorageManager::start(bsl::ostream& errorDescription) return rc_OVERFLOW_MAX_JOURNAL_FILE_SIZE; } - if (partitionCfg.maxQlistFileSize() > - mqbs::FileStoreProtocol::k_MAX_QLIST_FILE_SIZE_HARD) { + if (mqbs::FileStoreProtocol::k_MAX_QLIST_FILE_SIZE_HARD < + partitionCfg.maxQlistFileSize()) { BALL_LOG_ERROR << "Configured maxQlistFileSize (" << partitionCfg.maxQlistFileSize() << ") exceeds the protocol limit (" diff --git a/src/groups/mqb/mqbs/mqbs_filestoreprotocol.h b/src/groups/mqb/mqbs/mqbs_filestoreprotocol.h index 874536b49..95dbb8af8 100644 --- a/src/groups/mqb/mqbs/mqbs_filestoreprotocol.h +++ b/src/groups/mqb/mqbs/mqbs_filestoreprotocol.h @@ -60,13 +60,13 @@ // Max QlistFileHeader size.......................: 1020 bytes // Max QueueRecordHeader size.....................: 1020 bytes // Max Data file size.............................: 34359738360 bytes -// or 32GB - 8B +// or 32GiB - 8B // (See also: mqbs::FileStoreProtocol::k_MAX_DATA_FILE_SIZE_HARD) // Max Journal file size..........................: 17179869180 bytes -// or 16GB - 8B +// or 16GiB - 8B // (See also: mqbs::FileStoreProtocol::k_MAX_JOURNAL_FILE_SIZE_HARD) // Max Qlist file size............................: 17179869180 bytes -// or 16GB - 8B +// or 16GiB - 8B // (See also: mqbs::FileStoreProtocol::k_MAX_QLIST_FILE_SIZE_HARD) // Max Journal Record size........................: 1020 bytes // Max Journal Record types.......................: 15