Override *scan_each method for MultiStore
What does this MR do and why?
This MR defines methods in MultiStore
for scan_each/sscan_each/hscan_each/zscan_each
to remove inconsistencies during read and block execution.
It does so by checking if block.nil?
, calling the method without the block to get an Enumerator which acts on the block via .each
. This ensures that we only run read on the secondary store if there is a cache miss on the primary store. Presently, both primary and secondary instance reads will occur as passing a block into *scan_each
returns a nil.
I added **kwargs
into read commands since *scan_each
has match
and count
keyword arguments.
Issue: #386745 (closed)
This MR applies suggestion discussed in !107907 (comment 1226805605).
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.