Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Missing "pipe.execute()" in Roomba when purging timeseries #53

Closed
novoland opened this issue Sep 30, 2013 · 0 comments
Closed

Missing "pipe.execute()" in Roomba when purging timeseries #53

novoland opened this issue Sep 30, 2013 · 0 comments

Comments

@novoland
Copy link

Hi guys, here is the problem I encountered:

I hava some really old datapoints in redis. After I started Roomba, the whole timeseries should be purged as the last timestamp of it is much older than FULL_DURATION(+ ROOMBA_GRACE_TIME) seconds ago, but actually it is not and the variable "euthanized" somehow increased by 1. After going through the source I found that the reason may be the redis transaction is not submitted:

                #### Line 94
                 # Check if the last value is too old and purge
                if timeseries[-1][0] < now - duration:
                    pipe.delete(key)
                    pipe.srem(namespace + 'unique_metrics', key)
                    # ====== maybe we should call "pipe.execute()" here before "continue" ?
                    euthanized += 1
                    continue

and it is the same situation when purging timeseries which contains only 1 datapoint :

                #### Line 75
                # There's one value. Purge if it's too old
                try:
                    if not isinstance(timeseries[0], TupleType):
                        if timeseries[0] < now - duration:
                            pipe.delete(key)
                            pipe.srem(namespace + 'unique_metrics', key)
                            # ====== maybe we should call "pipe.execute()" here before "continue" ?
                            euthanized += 1
                        continue
                except IndexError:
                    continue

'Cause I'm new to Python or Redis, am I missing something ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant