diff options
author | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2020-11-02 10:02:43 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2020-11-02 10:02:43 +0000 |
commit | 7fe9b99240dc82a0416608c1f92c6ab50eea5dc4 (patch) | |
tree | e67353c2eff2a0938c380833f54e7f05da3013ee /storage/src | |
parent | 848ef45a8fa00dc553919f7947507b6e41ed4381 (diff) |
Update and add comments
Diffstat (limited to 'storage/src')
3 files changed, 19 insertions, 8 deletions
diff --git a/storage/src/vespa/storage/bucketdb/const_iterator.h b/storage/src/vespa/storage/bucketdb/const_iterator.h index 66f7b41554f..ae251754c58 100644 --- a/storage/src/vespa/storage/bucketdb/const_iterator.h +++ b/storage/src/vespa/storage/bucketdb/const_iterator.h @@ -5,6 +5,13 @@ namespace storage::bucketdb { +/** + * Iterator interface for iterating over entries in a bucket database. + * Implementations shall guarantee that iteration happens in natural key order. + * + * Key type is in the standard u64 "reversed bucket ID bits" form. + * Value type is always a (possibly wrapped) const reference to the entry itself. + */ template <typename ConstRefT> class ConstIterator { public: diff --git a/storage/src/vespa/storage/bucketdb/striped_btree_lockable_map.h b/storage/src/vespa/storage/bucketdb/striped_btree_lockable_map.h index 267f1905da8..b01f06c2b3f 100644 --- a/storage/src/vespa/storage/bucketdb/striped_btree_lockable_map.h +++ b/storage/src/vespa/storage/bucketdb/striped_btree_lockable_map.h @@ -7,12 +7,14 @@ namespace storage::bucketdb { -// Bucket database implementation that stripes all superbuckets across -// a set of disjoint sub-DBs. All locking is handled by the individual -// sub-DBs, meaning that accessing one does not cause contention for -// readers/writers accessing another. -// Ordered iteration is transparently provided by the const for_each method -// and by read guards. +/** + * Bucket database implementation that stripes all superbuckets across + * a set of disjoint sub-DBs. All locking is handled by the individual + * sub-DBs, meaning that accessing one does not cause contention for + * readers/writers accessing another. + * Ordered iteration is transparently provided by the const for_each method + * and by read guards. + */ template <typename T> class StripedBTreeLockableMap final : public AbstractBucketMap<T> { public: diff --git a/storage/src/vespa/storage/common/content_bucket_db_options.h b/storage/src/vespa/storage/common/content_bucket_db_options.h index f4a7e84a7b8..60c5f04b8c6 100644 --- a/storage/src/vespa/storage/common/content_bucket_db_options.h +++ b/storage/src/vespa/storage/common/content_bucket_db_options.h @@ -5,8 +5,10 @@ namespace storage { -// Type-safe encapsulation of any options that can be passed from config -// to the content node bucket database implementation. +/** + * Type-safe encapsulation of any options that can be passed from config + * to the content node bucket database implementation. + */ struct ContentBucketDbOptions { // The number of DB stripes created will be 2^n (within implementation limits) // TODO expose max limit here? |