gemhome / fnordmetric

(possible new home for) FnordMetric is a redis/ruby-based realtime Event-Tracking app
0 stars 1 forks source link

Need garbage collection for timeline data #16

Open bf4 opened 10 years ago

bf4 commented 10 years ago

Issue by yuanton Friday May 04, 2012 at 09:38 GMT Originally opened as https://github.com/paulasmuth/fnordmetric/issues/72


Looks like you just add data to this timeline key, but never clean old elements.

  def announce_to_timeline(event)
    timeline_key = key_prefix(:timeline)
    @redis.zadd(timeline_key, event[:_time], event[:_eid])
  end

as result this key size is about 50% of database.

This even bigger problem then you have small ttl for events data.

    :event_data_ttl => 60*5,

most element in timeline keys just point to nowhere, because events already deleted.

Also, and may be I'm wrong here, you dont even need to collect this data, when you have activated

  hide_active_users

In this case, timeline data is not used at all.

bf4 commented 10 years ago

Comment by teejteej Tuesday Oct 02, 2012 at 11:43 GMT


+1