Skip to content

Add dedicated bulk/FMB methods to redis CAS backend

Jeremiah Bonney requested to merge jbonney/redis-cas-bulk into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This PR adds implementations of bulk_update_blobs and bulk_read_blobs as well as updating missing_blobs for the Redis CAS backend to take advantage of batch operations. mget/mset can be used to get/set multiple keys at once, while redis pipelines can be used to reduce the number of round-trips needed for missing_blobs. This should significantly speedup the Redis CAS backend.

Changes proposed in this merge request:

  • Use mget to implement bulk_read_blobs for Redis storage
  • Use mset to implement bulk_update_blobs for Redis storage
  • Use pipelines to speedup missing_blobs for Redis storage

Validation

Existing tests pass and the speed can be compared by using one of the docker-compose setups which use Redis as a storage backed, such as docker-compose-examples/redis-sentinel-action-cache.yaml.

Issues addressed

Closes #403 (closed)

Merge request reports