Skip to content

fix: enabled redis key events

Diego Molteni requested to merge slb/dm3/cache-event into master

Type of change

  • Bug Fix
  • Feature
  • Pipeline
  • Test
  • Documentation

Does this introduce a change in the core logic?

  • No
  • Yes

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Anthos
  • Azure
  • GCP
  • IBM

Does this follow conventional commits spec?

  • No
  • Yes

Have you set the target Milestone?

  • No
  • Yes

Have you set the no-detached-pipeline label?

  • No
  • Yes

Updates description?

The Locker cache was not listening to key events (especially the expired one). This was causing issue on releasing the read locker

Problem:

127.0.0.1:6379> KEYS *

  1. "opendes/sandboxxx/dsx01/RdcDgMaPX08dPbT1"
  2. "opendes/sandboxxx/dsx01/RqGY7ht9PinyxfIu"
  3. "opendes/sandboxxx/dsx01" 127.0.0.1:6379> GET "opendes/sandboxxx/dsx01" "rms:RdcDgMaPX08dPbT1:RqGY7ht9PinyxfIu"

127.0.0.1:6379> KEYS *

  1. "opendes/sandboxxx/dsx01/RqGY7ht9PinyxfIu"
  2. "opendes/sandboxxx/dsx01" 127.0.0.1:6379> GET "opendes/sandboxxx/dsx01" "rms:RdcDgMaPX08dPbT1:RqGY7ht9PinyxfIu" // NOTE HERE THE MAIN READ LOCK DOES NOT REMOVE THE EXPIRED KEY RdcDgMaPX08dPbT1

127.0.0.1:6379> KEYS *

  1. "opendes/sandboxxx/dsx01" 127.0.0.1:6379> GET "opendes/sandboxxx/dsx01" "rms:RdcDgMaPX08dPbT1:RqGY7ht9PinyxfIu" // NOTE HERE THE MAIN READ LOCK DOES NOT REMOVE THE EXPIRED KEY RdcDgMaPX08dPbT1 && RqGY7ht9PinyxfIu

Resolution:

127.0.0.1:6379> KEYS *

  1. "opendes/sandboxxx/dsx01/REj0g09antgEfWUd"
  2. "opendes/sandboxxx/dsx01/RU3tdF9vQklORxOV"
  3. "opendes/sandboxxx/dsx01" 127.0.0.1:6379> GET opendes/sandboxxx/dsx01 "rms:REj0g09antgEfWUd:RU3tdF9vQklORxOV"

127.0.0.1:6379> KEYS *

  1. "opendes/sandboxxx/dsx01/RU3tdF9vQklORxOV"
  2. "opendes/sandboxxx/dsx01" 127.0.0.1:6379> GET opendes/sandboxxx/dsx01 "rms:RU3tdF9vQklORxOV" // NOTE THE EXPIRE REj0g09antgEfWUd LOCK HAS BEEN REMOVED FROM THE MAIN READ LOCK

127.0.0.1:6379> KEYS * (empty array) // ONCE ALL READ LOCKS EXPIRE THE MAIN READ LOCK GET REMOVED

Edited by Diego Molteni

Merge request reports