1 2008-09-07 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
3 * idea: have a new flag on recentfiles with the meaning: if this
4 changes, you're required to run a full rsync over all the files. The
5 reason why we set it would probably be: some foul happened. we injected
6 files in arbitrary places or didn't inject them although they changed.
7 The content of the flag? Timestamp? The relation between the
8 recentfiles would have to be inheritance from the principal, because any
9 out of band changes would soon later propagate to the next recentfile.
11 By upping the flag often one can easily ruin the slaves.
13 last out of band change? dirtymark?
15 Anyway, this implies that we read a potentially existing recentfile
18 And it implies that we have an eventloop that keeps us busy in 2-3
19 cycles, one for current stuff (tight loop) and one for the recentfiles
20 (cascade when principal has changed), one for the old stuff after a
23 2008-09-05 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
25 * need a way to "return" the next entry after the end of a list. When
26 the caller says "before" or "after" we would like to know if he could
27 cover that interval/threshold or not because this influences the effect
28 of a newer timestamp of that recentfile. DONE with $opt{info}.
30 2008-09-04 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
32 * one of the next things to tackle: the equivalent of csync2 -TIXU.
34 loop implies tixu (?). Nope, something like --statefile decides. Per
37 T test, I init, X including removals, U nodirtymark
39 So we have no concept of dirtymarks, we only trust that since we are
40 running we have observed everything steadily. But people will not let
41 this program run forever so we must consider both startup penalty and
42 book keeping for later runs. We keep this for later. For now we write a
43 long running mirror that merges several intervals.
45 2008-09-02 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
47 * need to speed up the 02 test, it's not clever to sleep so much. Reduce
50 * rersyncrecent, the script: default to one week. The name of the switch
51 is --after. Other switches? --loop!
53 2008-08-30 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
55 * need a switch --skip-deletes (?)
57 * need a switch --enduser that tells us that the whole tempfile
58 discipline is not needed when there is no downstream user. (?)
60 Without this switch we cannot have a reasonable recent.pl that just
61 displays the recent additions. Either we accept to download everything.
62 Or we download temporary files without the typical rsync protocol
65 Or maybe the switch is --tmpdir? If --tmpdir would mean: do not use
66 File::Temp::tempdir, this might be a win.
68 2008-08-29 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
70 * apropos missing: we have no push, we never know the downstream
71 servers. People who know their downstream hosts and want to ascertain
72 something will want additional methods we have never thought about, like
73 update or delete a certain file.
75 2008-08-26 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
77 * tempted to refactor rmirror into resolve_symlink, localize, etc.
78 Curious if rsync_options=links equal 0 vs. 1 will make the expected
81 * rsync options: it's a bit of a pain that we usually need several rsync
82 options, like compress, links, times, checksum and that there is no
83 reasonable default except the original rsync default. I think wee can
84 safely assume that the rsync options are shared between all recentfile
85 instances within one recent tree.
87 2008-08-20 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
89 * deletes: if a delete follows an add quickly enough it may happen that
90 a downstream mirror did not see the add at all! It seems this needs to
91 be mentioned somewhere. The point here is that even if the downstream is
92 never missing the principal timeframe it may encounter a "delete" that
93 has no complimentary "add" anywhere.
95 2008-08-19 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
97 * I suspect the treat of metadata is incorrect during read or something.
98 The bug that I am watching is that between 06:08 and 06:09 the 6h file
99 contained more than 6 hours worth of data. At 06:08 we merged into the
100 1d file. We need to take snapshots of the 6h file over the course of an
101 hour or maybe only between XX:08 and XX:09? Nope, the latter is not
104 Much worse: watching the 1h file: right at the moment (at 06:35) it
105 covers 1218867584-1219120397 which is 70 hours.
107 Something terribly broken. BTW, 1218867584 corresponds to Sat Aug 16
108 08:19:44 2008, that is when I checked out last time, so it seems to be
109 aggregating and never truncating?
111 No, correct is: it is never truncating; but wrong is: it is aggregating.
112 It does receive a lot of events from time to time from a larger file.
113 Somehow a large file gets merged into the small one and because the
114 "meta/merged" attribute is missing, nobody is paying attention. I
115 believe that I can fix this by making sure that metadata are honoured
116 during read. DONE and test adjusted.
118 2008-08-17 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
120 * grand renaming plan
122 remotebase => remoteroot to fit well with localroot DONE
123 local_path() => localroot seems to me should already work DONE
124 recentfile_basename => rfilename no need to stress it has no slash DONE
126 filenameroot??? Doesn't seem too bad to me today. Maybe something like
127 kern? It would anyway need a deprecation cycle because it is an
128 important constructor.
130 * I like the portability that Data::Serializer brings us but the price
131 is that some day we might find out that it is slowing us a bit. We'll
134 2008-08-16 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
136 * should we not enter the interval of the principal (or the interval of
137 the merging file?) in every aggregated/merged file?
139 * we should aim at a first release and give up on thinking about
140 sanitizing stuff and zloop. Let's just admit that a full traditional
141 rsync is the only available sanitizer ATM. Otherwise it's complicated
142 stuff: sanitizing on the origin server, sanitizing on the slaves,
143 sanitizing forgotten files, broken timestamps, etc. Let's delay it and
144 get the basics out before this becomes a major cause for mess.
146 2008-08-13 Andreas Koenig <k@andreas-koenigs-computer.local>
148 * On OSes not supporting symlinks we expect that RECENT.recent contains
149 the contents of the principal recentfile. Actually this is identical on
150 systems supporting symlinks. Simple, what follows from that is that we
151 need to keep the serializer in the metadata because we cannot read it
152 from the filename, doesn't it? Of course not. It's a chicken and egg
153 problem. This leaves us with the problem to actually parse the
154 serialized data to find out in which format it is. So who can do the 4
155 or 5 magics we wanted to support? File::LibMagic?
157 2008-08-09 Andreas Koenig <k@andreas-koenigs-computer.local>
159 * remotebase and recentfile_basename are ugly names. Now that we need a
160 word for the shortest/principal/driving recentfile too we should do
163 localroot is good. rfile is good. local_path() is bad, local_path($path)
164 is medium, filenameroot() is bad, remotebase is bad, recentfile is
167 Up to now remotebase was the string that described the remote root
168 directory in rsync notation, like pause.perl.org::authors. And
169 recentfile_basename was "RECENT-1h.yaml".
171 2008-08-08 Andreas Koenig <k@andreas-koenigs-computer.local>
173 * The test that was added in today's checkin is a good start for a test
174 of rmirror. We should have more methods in Recent.pm: verify,
175 addmissingfiles. We should verify the current tree, then rmirror it and
176 then verifytree the copy. We could then add some arbitrary file and let
177 it be discovered by addmissingfiles, then rmirror again and then
178 verifytree the copy again.
180 Then we could start stealing from csync2 sqlite database [no port to
181 OSX!] and fill a local DB. And methods to compare the database with the
182 recentfiles. Our strength is that in principle we could maintain state
183 with a single float. We have synced up to 1234567890.123456. If the Z
184 file does not add new files all we have to do is mirror the new ones and
187 This makes it clear that we should extend current protocol and declare
188 that we cheat when we add files too late, just to help the other end
189 keeping track. Ah yes, that's what was meant when zloop was mentioned
192 Maybe need to revisit File::Mirror to help me with this task.
194 2008-08-07 Andreas Koenig <k@andreas-koenigs-computer.local>
196 * There must be an allow-me-to-truncate flag in every recentfile.
197 Without it one could construct a sequence of updates winning the locking
198 battle against the aggregator. Only if an aggregator has managed to
199 merge data over to the next level, truncating can be allowed. DONE with
202 2008-08-06 Andreas Koenig <k@andreas-koenigs-computer.local>
204 * We should probably guarantee that no duplicates enter the aggregator
207 2008-08-02 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
209 * To get merge operation faster would need a good benchmark test. What
210 02 spits out isn't reliable enough and is dominated by many other
213 commit 10176bf6b79865d4fe9f46e3857a3b8669fa7961
214 Author: Andreas J. Koenig <k@k75.(none)>
215 Date: Sat Aug 2 07:58:04 2008 +0200
219 commit 3243120a0c120aaddcd9b1f4db6689ff12ed2523
220 Author: Andreas J. Koenig <k@k75.(none)>
221 Date: Sat Aug 2 11:40:29 2008 +0200
223 there was a lot of trying but the effect is hardly measurable with
226 * overhead of connecting seems high. When setting
227 max_files_per_connection to 1 we see that.
229 2008-08-01 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
231 * 1217622571.0889 - 1217597432.86734 = 25138.2215600014
233 25138.2215600014/3600 = 6.98283932222261
235 It jumps into the eye that this is ~ 7 hours, not ~6, so there seems to
236 be a bug in the aggregator. FIXED
238 2008-07-27 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
240 * e.g. id/Y/YE/YEWENBIN/Emacs-PDE-0.2.16.tar.gz: Do we have it, should
241 we have it, can we mirror it, mirror it!
243 I fear this needs a new class which might be called
244 File::Rsync::Mirror::Recent. It would collect all recentfiles of a kind
245 and treat them as an entity. I realize that a single recentfile may be
246 sufficient for certain tasks and that it is handy for the low level
247 programmer but it is not nice to use. If there is a delete in the 1h
248 file then the 6h file still contains it. Seekers of the best information
249 need to combine at least some of the recentfiles most of the time.
251 There is the place for the Z loop!
253 But the combination is something to collect in a database, isn't it. Did
254 csync2 just harrumph?
256 2008-07-26 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
258 * it just occurred to me that hosts in the same mirroring pool could
259 help out each other even without rewriting the recentfile. Just fetch
260 the stuff to mirror from several places, bingo. But that's something
261 that should rather live in a separate package or in rsync directly.
263 * cronjobs are unsuited because with ntp they would all come at the full
264 minute and disturb each other. Besides that I'd hate to have a backbone
265 with more than a few seconds latency.
267 2008-07-25 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
269 * a second rsync server with access control for PAUSE. Port? 873 is the
270 standard port, let's take 8873.
272 * if there were a filesystem based on this, it would have a slow access
273 to inexistent files. It would probably provide wrong readdir (only based
274 on current content) or also a slow one (based on a recentfile written
275 after the call). But it would provide fast access to existing files. Or
276 one would deliberately allow slightly blurred answers based on some
277 sqlite reflection of the recentfiles.
279 * todo: write a variant of mirror() that combines two or more
280 recentfiles and treats them like one
282 * todo: signal handler to remove the tempfile
284 2008-07-24 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
286 * now that we have the symlink I forgot how it should be used in
289 * the z loop: add missing files to Z file. Just append them (instead of
290 prepending). So one guy prepends something from the Y file from time to
291 time and another guy appends something rather frequently. Collecting
292 pond. When Y merges into Z, things get epoch and the collecting pond
293 gets smaller. What exactly are "missing files"?
295 take note of current epoch of the alpha file, let's call it the
298 find all files on disk
300 remove all files registered in the recentworld up to recent-ts
302 remove all files that have been deleted after recent-ts according to
305 2008-07-23 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
307 * rersyncrecent might be a cronjob with a (locked) state file which
308 contains things like after and maybe last z sync or such?
310 rrr-mirror might be an alternative name but how would we justify the
311 three Rs when there is no Re-Rsync-Recent?
313 With the --loop parameter it is an endless loop, without it is no loop.
314 At least this is simple.
316 * todo: new accssor z-interval specifies how often the Z file is updated
317 against the filesystem. We probably want no epoch stamp on these
318 entries. And we want to be able to filter the entries (e.g. no
319 by-modules and by-category tree)
321 2008-07-20 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
323 * Fill the Z file. gc or fsck or both. Somehow we must get the old files
324 into Z. We do not need the other files filled up with filesystem
327 * need interface to query for a file in order to NOT call update on
328 PAUSE a second time within a short time.
330 2008-07-19 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
332 * recommended update interval? Makes no sense, is different for
339 change-log-default-name: "Todo"