Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public KeyValueIterator<Bytes, byte[]> all() {
public <PS extends Serializer<P>, P> KeyValueIterator<Bytes, byte[]> prefixScan(final P prefix, final PS prefixKeySerializer) {
validateStoreOpen();
final KeyValueIterator<Bytes, byte[]> storeIterator = wrapped().prefixScan(prefix, prefixKeySerializer);
final Bytes from = Bytes.wrap(prefixKeySerializer.serialize(null, prefix));
final Bytes from = Bytes.wrap(prefixKeySerializer.serialize(null, internalContext.headers(), prefix));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about this a little bit, and this change sounds generally ok to me.

But I would assume, that there is also other code (ie, other classes implementing prefixScan method that might need some updates, too?

Btw: we also just added CachingKeyValueStoreWithHeaders for which we might want to do this differently, ie, similar to what we did for put(key, null) -- ie, the change would not go into CachingKeyValueStoreWithHeaders but rather MeteredTimestampKeyValueStoreWithHeaders to modify the RecordContext set on the internalContext object. 🤔

final Bytes to = ByteUtils.increment(from);
final ThreadCache.MemoryLRUCacheBytesIterator cacheIterator = internalContext.cache().range(cacheName, from, to, false);
return new MergedSortedCacheKeyValueBytesStoreIterator(cacheIterator, storeIterator, true);
Expand Down
Loading