Skip to content

RedisKeyExpiredEvent is published when entity expiring was changed from positive to -1, resulting in dropping meta information (indexes etc) #1955

Closed
@muchnik

Description

@muchnik

Hi,
I'am using spring boot data redis 2.2.4Release with lettuce 5.2.1 and faced some strange behaviour.
When im persisting some expiring entities (changing ttl from positive to -1), there is still (after :phantom expiring hits) meta information deleting, dropping indexes and so on.

Reproduction

  1. Save an entity with any field @Indexed and @TimeToLive field > 0
  2. Spring data creates :phantom entity with TTL(base ttl + some seconds), :idx and some SET meta entries (for indexing)
  3. Get our entity, change @TimeToLive field to -1 (no expiry), save via repository interface method
  4. :phantom copy expiry TTL is not changed, and still counting down
  5. After :phantom expire hits, spring expiry event published, :idx and meta set is deleted from space

Expected behaviour:
When entity updated with @TimeToLive field changed from expiry (>0) to no_expire (-1) - :phantom entity is removed or event incoming from :phantom expire not doing anything

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions