Jason Xu
Jason Xu

Reputation: 2963

Given a Redis RDB snapshot, is there a way to extract OBJECT IDLETIME of keys?

The background is that in production Redis Cluster, after a long period of feature iteration there're a bunch of keys are either problematic or inactive for long, e.g. lack of TTL.

To have a systematic way to catch all questionable keys I started analysing nightly snapshot with RDB libs like https://github.com/HDT3213/rdb.

So,

  1. Is OBJECT IDELTIME captured in rdb snapshot?
  2. Any advice to extract it for further analysis?

Upvotes: 0

Views: 108

Answers (1)

for_stack
for_stack

Reputation: 22981

Is OBJECT IDELTIME captured in rdb snapshot?

NO. And you cannot get the idle time from RDB file.

Any advice to extract it for further analysis?

Why not scan keys in the online data set with a small count option, and collect the info with OBJECT IDELTIME command? If you use a small count option, it won't have big penalty on the performance of the online service.

Upvotes: 2

Related Questions