summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-03-10 17:34:10 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-03-10 17:34:10 +0100
commitcbe17e3249a6f93a68d80eb6a9a78b65680c0122 (patch)
tree4bf0d68e82faea32cb8a01980c99be14de3d48ef
parent71252490637d6dc4c5760ef2730ec67d6829e08a (diff)
Extend class comments.
-rw-r--r--vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h16
-rw-r--r--vespalib/src/vespa/vespalib/datastore/simple_hash_map.h16
2 files changed, 30 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h b/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h
index cf6674777b7..bafcf642a8d 100644
--- a/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h
+++ b/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h
@@ -17,7 +17,21 @@ namespace vespalib::datastore {
class EntryComparator;
/*
- * Fixed sized hash map over keys in data store.
+ * Fixed sized hash map over keys in data store, meant to support a faster
+ * dictionary for unique store with relation to lookups.
+ *
+ * Currently hardcoded key and data types, where key references an entry
+ * in a UniqueStore and value references a posting list
+ * (cf. search::attribute::PostingStore).
+ *
+ * This structure supports one writer and many readers.
+ *
+ * A reader must own an appropriate GenerationHandler::Guard to ensure
+ * that memory is held while it can be accessed by reader.
+ *
+ * The writer must update generation and call transfer_hold_lists and
+ * trim_hold_lists as needed to free up memory no longer needed by any
+ * readers.
*/
class FixedSizeHashMap {
public:
diff --git a/vespalib/src/vespa/vespalib/datastore/simple_hash_map.h b/vespalib/src/vespa/vespalib/datastore/simple_hash_map.h
index 632ae65fc12..506c1a3ea3f 100644
--- a/vespalib/src/vespa/vespalib/datastore/simple_hash_map.h
+++ b/vespalib/src/vespa/vespalib/datastore/simple_hash_map.h
@@ -13,7 +13,21 @@ class FixedSizeHashMap;
class EntryComparator;
/*
- * Hash map over keys in data store.
+ * Hash map over keys in data store, meant to support a faster
+ * dictionary for unique store with relation to lookups.
+ *
+ * Currently hardcoded key and data types, where key references an entry
+ * in a UniqueStore and value references a posting list
+ * (cf. search::attribute::PostingStore).
+ *
+ * This structure supports one writer and many readers.
+ *
+ * A reader must own an appropriate GenerationHandler::Guard to ensure
+ * that memory is held while it can be accessed by reader.
+ *
+ * The writer must update generation and call transfer_hold_lists and
+ * trim_hold_lists as needed to free up memory no longer needed by any
+ * readers.
*/
class SimpleHashMap {
public: