Comments (3)
Related: #3 (comment)
Another relevant thought: not thinning out in the "recent" category should be an option. Is it currently?
from timegaps.
I initially thought this is what "recent" is about. I thought wrong. After 2,2TB and a successful snapshot transfer, it chose to delete the last and only source snapshot :(
After some testing, i think "recent" should be named "hours".
+1 for keeplast implementation. I would call it "latest" and rename recent to hours.
from timegaps.
Thanks for the feedback Wolfgang and Bernd!
I agree that the paradigm of "keep the last N" is intuitively useful. In fact, that is what I thought initially. But things seem to be a little more complicated than that.
The following example hopefully shows that simply keeping the last N can result in data loss, too, when invoking timegaps very frequently.
An item younger than 1 hour is in the "recent" category.
Let's imagine timegaps was to keep the 5 most recent (as you wrote, the 5 last or newest items) in that category.
Let's imagine items are created at a high rate, e.g. every two minutes. Let's consider the case where timegaps is invoked at a high rate, too (many times per hour, regularly or irregularly).
In this example scenario items would be deleted before they get to be 1 hour old. Propagation of the older items would not happen; and timegaps would break one of its promises.
It is precisely this effect which made me switch to the "keep the oldest items" paradigm. I seem to have thought about that a few years ago and wrote this into the TODO file:
For recent items, we should also keep the older ones so that it is safe to
invoke timegaps at any time and at any frequency. In the extreme case this
will reject the newest backup and only keep the almost-one-hour-old one,
but this is predictable and can be reliably worked around by the user. If
we rejected the oldest recent items, however, sudden frequent invocation
of item creation and timegaps would reject older items. Instead, sudden
frequent invocation of item creation and timegaps should reject the
unnecessary amount of newer items.
Got that from here:
Line 29 in fffaf13
Now, you brought up very valid concerns. What can we do?
What if we were to keep the oldest N and the newest M in the "recent" category (again, this is where all items are in that are younger than 1 hour)? That would ensure backpropagation of the oldest items. In an extreme case it could still rip a hole of <1 hour into the item distribution, though. In terms of thinning data out this should be desired. However, if that is a problem in any workflow the only viable solution is to add another time category with a more fine-grained resolution than 1 hour.
This is just me thinking out loud!
from timegaps.
Related Issues (8)
- Problem installing from PyPI HOT 4
- Confusing error message about codec HOT 2
- Unexpected rejection of items when calling timegaps periodically (with "accept youngest item in category" method) HOT 18
- FeatureRequest: Parameter --ignore-invalid-items or --time-from-string-regex
- Make rules more flexible
- Unexpected loss of items with "accept oldest item in category" approach HOT 23
- Confusing if "recent" is not used.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timegaps.