You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the caching of the find_{keys,key_value}_by_prefix operations. (#4576)
## Motivation
The `find_keys_by_prefix` has emerged as a choke point for some
benchmarks.
Considering that it is the only part that is not cached, it is
interesting to consider this.
## Proposal
The implementation is done in the following way:
* The `find_{keys,key_values}_by_prefix` are cached.
* The `delete_prefix` leads to a `find_key_values_by_prefix` entry in
the cache.
* All the information about the operation is used to avoid making some
calls to the storage.
## Test Plan
The CI.
Some unit tests have been added to the `lru_caching.rs` file.
## Release Plan
The input file would change because some additional entries have been
added.
However, this can still be ported to existing DevNet / TestNet.
## Links
None.
Copy file name to clipboardExpand all lines: CLI.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,12 +188,27 @@ Client implementation and command-line tool for the Linera blockchain
188
188
*`--storage-max-cache-size <STORAGE_MAX_CACHE_SIZE>` — The maximal memory used in the storage cache
189
189
190
190
Default value: `10000000`
191
-
*`--storage-max-entry-size <STORAGE_MAX_ENTRY_SIZE>` — The maximal size of an entry in the storage cache
191
+
*`--storage-max-value-entry-size <STORAGE_MAX_VALUE_ENTRY_SIZE>` — The maximal size of a value entry in the storage cache
192
+
193
+
Default value: `1000000`
194
+
*`--storage-max-find-keys-entry-size <STORAGE_MAX_FIND_KEYS_ENTRY_SIZE>` — The maximal size of a find-keys entry in the storage cache
195
+
196
+
Default value: `1000000`
197
+
*`--storage-max-find-key-values-entry-size <STORAGE_MAX_FIND_KEY_VALUES_ENTRY_SIZE>` — The maximal size of a find-key-values entry in the storage cache
192
198
193
199
Default value: `1000000`
194
200
*`--storage-max-cache-entries <STORAGE_MAX_CACHE_ENTRIES>` — The maximal number of entries in the storage cache
195
201
196
202
Default value: `1000`
203
+
*`--storage-max-cache-value-size <STORAGE_MAX_CACHE_VALUE_SIZE>` — The maximal memory used in the value cache
204
+
205
+
Default value: `10000000`
206
+
*`--storage-max-cache-find-keys-size <STORAGE_MAX_CACHE_FIND_KEYS_SIZE>` — The maximal memory used in the find_keys_by_prefix cache
207
+
208
+
Default value: `10000000`
209
+
*`--storage-max-cache-find-key-values-size <STORAGE_MAX_CACHE_FIND_KEY_VALUES_SIZE>` — The maximal memory used in the find_key_values_by_prefix cache
210
+
211
+
Default value: `10000000`
197
212
*`--storage-replication-factor <STORAGE_REPLICATION_FACTOR>` — The replication factor for the keyspace
0 commit comments