summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-04-27 17:08:25 +0200
committerTor Egge <Tor.Egge@online.no>2022-04-27 17:08:25 +0200
commit60b0de3e295dd51e044f602c45d42709bf57d2ef (patch)
treeb4e61a51c001506d4ee6c008c5caff74772c47f2 /searchcore
parentb29b53dadc733242f94b32e0a44766af7f8b2c42 (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.h4
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 &timestamp, 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());