Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary indexes not removed if id contains colon [DATAREDIS-744] #1326

spring-projects-issues opened this issue Dec 18, 2017 · 2 comments
in: core type: bug


Copy link

spring-projects-issues commented Dec 18, 2017

Michał Bobowski opened DATAREDIS-744 and commented


I've set ttl for my data using:

@RedisHash(value = "user_content", timeToLive = 60)

And enabled keyspace events by setting EnableKeyspaceEvents.ON_STARTUP.

During tests I discovered that secondary indexes are not removed after expiration and I spent couple hours on debugging. What I found was quite shocking:

  • I inserted key "user_content:ipla:some7:vod:0123456789abcdef0123456789abcdef"
  • Phantom key was created as well
  • Key expired after TTL
  • Expiration Message was generated and received by MappingExpirationListener
  • Function isKeyExpirationMessage returned false and event was rejected

The reason is below:

byte[][] args = ByteUtils.split(message.getBody(), ':');
if (args.length != 2) {
  return false;

Message body is equal to my expiring key, therefore splitting it this way returns 6 rather than 2. Is there a hidden assumption that keys must not contain ":" sign? Or am I completely wrong about it?

Affects: 1.8.9 (Ingalls SR9)

Issue Links:

  • DATAREDIS-572 A NullPointerException is thrown when listen the key expire event

Referenced from: pull request #298

Backported to: 2.0.3 (Kay SR3), 1.8.10 (Ingalls SR10)

Copy link

spring-projects-issues commented Dec 18, 2017

Mark Paluch commented

Thanks for reporting the issue. That's a bug on our side – we're using colons to separate individual components from each other. Using Id's that contain colons interferes with our separators

Copy link

spring-projects-issues commented Dec 18, 2017

Michał Bobowski commented

Thanks for response and good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: bug
None yet

No branches or pull requests

2 participants