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
Make KVItem.Value() method asynchronous, and return error.
KVItem.Value() now takes a func that is called with the slice containing
the bytes for the value. This slice directly references the memory map
for the value log. It allows us to avoid copying bytes from the mmap-ed
value log.
Other related changes:
* Add a field to KVItem to hold a reference to the corresponding KV.
* Add a field to KVItem to track whether the value has been prefetched.
* Add a field to KVItem to record any errors during prefetching.
* Change the semantics of iteration. We don’t fetch values by design
anymore. So FetchValues does not apply normally. It only applies in the
case of prefetching. So renamed it to PrefetchValues. PrefetchSize now
only applies if PrefetchValues is true.
* If PrefetchValues is true, we copy values from mmap and set item.val.
* Remove KV.FillValue() method. We don’t fetch value synchronously
anymore, this method is not relevant.
* Refactor some private methods in value.go
* Fixes to tests. Added a helper method to asynchronously retrieve the
value and assign it to a variable.
0 commit comments