diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-02-02 05:27:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 05:27:53 +0100 |
commit | 0a2af44e48c9f2d5cf7df1877d71591bead4951f (patch) | |
tree | 75b233d56e507ea7b768d1ce45529d374946601c /storageapi | |
parent | 6ad76b1e5f1239cb2ecc41cd69eff2888916941e (diff) |
Revert "Implement BucketExecutor::sync."
Diffstat (limited to 'storageapi')
-rw-r--r-- | storageapi/src/vespa/storageapi/buckets/bucketinfo.cpp | 5 | ||||
-rw-r--r-- | storageapi/src/vespa/storageapi/buckets/bucketinfo.h | 40 |
2 files changed, 23 insertions, 22 deletions
diff --git a/storageapi/src/vespa/storageapi/buckets/bucketinfo.cpp b/storageapi/src/vespa/storageapi/buckets/bucketinfo.cpp index 4c3b290d4d7..9e4e48d67f4 100644 --- a/storageapi/src/vespa/storageapi/buckets/bucketinfo.cpp +++ b/storageapi/src/vespa/storageapi/buckets/bucketinfo.cpp @@ -19,7 +19,8 @@ BucketInfo::BucketInfo() noexcept _active(false) {} -BucketInfo::BucketInfo(uint32_t checksum, uint32_t docCount, uint32_t totDocSize) noexcept +BucketInfo::BucketInfo(uint32_t checksum, uint32_t docCount, + uint32_t totDocSize) noexcept : _lastModified(0), _checksum(checksum), _docCount(docCount), @@ -72,7 +73,7 @@ BucketInfo::BucketInfo(uint32_t checksum, uint32_t docCount, {} bool -BucketInfo::operator==(const BucketInfo& info) const noexcept +BucketInfo::operator==(const BucketInfo& info) const { return (_checksum == info._checksum && _docCount == info._docCount && diff --git a/storageapi/src/vespa/storageapi/buckets/bucketinfo.h b/storageapi/src/vespa/storageapi/buckets/bucketinfo.h index 7e6e7a2aed2..5b2de4b4d61 100644 --- a/storageapi/src/vespa/storageapi/buckets/bucketinfo.h +++ b/storageapi/src/vespa/storageapi/buckets/bucketinfo.h @@ -42,37 +42,37 @@ public: uint32_t metaCount, uint32_t usedFileSize, bool ready, bool active, Timestamp lastModified) noexcept; - Timestamp getLastModified() const noexcept { return _lastModified; } - uint32_t getChecksum() const noexcept { return _checksum; } - uint32_t getDocumentCount() const noexcept { return _docCount; } - uint32_t getTotalDocumentSize() const noexcept { return _totDocSize; } - uint32_t getMetaCount() const noexcept { return _metaCount; } - uint32_t getUsedFileSize() const noexcept { return _usedFileSize; } - bool isReady() const noexcept { return _ready; } - bool isActive() const noexcept { return _active; } + Timestamp getLastModified() const { return _lastModified; } + uint32_t getChecksum() const { return _checksum; } + uint32_t getDocumentCount() const { return _docCount; } + uint32_t getTotalDocumentSize() const { return _totDocSize; } + uint32_t getMetaCount() const { return _metaCount; } + uint32_t getUsedFileSize() const { return _usedFileSize; } + bool isReady() const { return _ready; } + bool isActive() const { return _active; } - void setChecksum(uint32_t crc) noexcept { _checksum = crc; } - void setDocumentCount(uint32_t count) noexcept { _docCount = count; } - void setTotalDocumentSize(uint32_t size) noexcept { _totDocSize = size; } - void setMetaCount(uint32_t count) noexcept { _metaCount = count; } - void setUsedFileSize(uint32_t size) noexcept { _usedFileSize = size; } - void setReady(bool ready = true) noexcept { _ready = ready; } - void setActive(bool active = true) noexcept { _active = active; } - void setLastModified(Timestamp lastModified) noexcept { _lastModified = lastModified; } + void setChecksum(uint32_t crc) { _checksum = crc; } + void setDocumentCount(uint32_t count) { _docCount = count; } + void setTotalDocumentSize(uint32_t size) { _totDocSize = size; } + void setMetaCount(uint32_t count) { _metaCount = count; } + void setUsedFileSize(uint32_t size) { _usedFileSize = size; } + void setReady(bool ready = true) { _ready = ready; } + void setActive(bool active = true) { _active = active; } + void setLastModified(Timestamp lastModified) { _lastModified = lastModified; } /** * Only compare checksum, total document count and document * size, not meta count or used file size. */ - bool equalDocumentInfo(const BucketInfo& other) const noexcept { + bool equalDocumentInfo(const BucketInfo& other) const { return (_checksum == other._checksum && _docCount == other._docCount && _totDocSize == other._totDocSize); } - bool operator==(const BucketInfo& info) const noexcept; - bool valid() const noexcept { return (_docCount > 0 || _totDocSize == 0); } - bool empty() const noexcept { + bool operator==(const BucketInfo& info) const; + bool valid() const { return (_docCount > 0 || _totDocSize == 0); } + bool empty() const { return _metaCount == 0 && _usedFileSize == 0 && _checksum == 0; } vespalib::string toString() const; |