diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-04-27 17:08:25 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-04-27 17:08:25 +0200 |
commit | 60b0de3e295dd51e044f602c45d42709bf57d2ef (patch) | |
tree | b4e61a51c001506d4ee6c008c5caff74772c47f2 /searchcore | |
parent | b29b53dadc733242f94b32e0a44766af7f8b2c42 (diff) |
Explicitly initialize timestamp to 0 in default constructor.
Add masking in getBucketUsedBits().
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h index edf60d2a3c3..b5e512fcd9e 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h @@ -28,7 +28,7 @@ struct RawDocumentMetaData RawDocumentMetaData() noexcept : _gid(), _bucket_used_bits_and_doc_size(BucketId::minNumBits), - _timestamp() + _timestamp(0) { } RawDocumentMetaData(const GlobalId &gid, const BucketId &bucketId, const Timestamp ×tamp, uint32_t docSize) noexcept @@ -65,7 +65,7 @@ struct RawDocumentMetaData const GlobalId &getGid() const { return _gid; } GlobalId &getGid() { return _gid; } void setGid(const GlobalId &rhs) { _gid = rhs; } - uint8_t getBucketUsedBits() const { return _bucket_used_bits_and_doc_size.load(std::memory_order_relaxed); } + uint8_t getBucketUsedBits() const { return _bucket_used_bits_and_doc_size.load(std::memory_order_relaxed) & 0xffu; } BucketId getBucketId() const { BucketId ret(_gid.convertToBucketId()); |