[rrd-developers] rrd file access code

Tobias Oetiker tobi at oetiker.ch
Mon Oct 13 20:29:23 CEST 2008


Today Bernhard Reutner-Fischer wrote:

> >> Is there some ongoing work to centralise the file access code?  Would it
> >> be worthwhile for me to patch some of this code (e.g. rrd_create.c) to
> >> go through the functions in rrd_open.c, or is there some other solution
> >> coming?
> >
> >I think create is one of the few places where there is local code,
> >you can try converting it, but there will be some generalisation
> >issues which caused the conversion not to happen the first time
> >around.
>
> There were no technical issues but create is not performance critical as
> opposed to e.g. update, fetch, etc. (at least in my POV) so it was not
> initially converted. I would consider finishing the conversion of all
> such spots a cleanup.
>
> It should be straight forward to update rrd_create and eventual other
> leftovers to the interface provided in rrc_open.c (it deliberately
> mimics normal read/write semantics to ease conversion).

one of the side effects of the new mmap rw code is that variable
which used to simple copies of the rrd file ARE now the actual
file. so for example in the rrd_resize code this lead to some
intersting side effects where original rrd file was modified
inadvertedly.

but I agree with create where a new file is written, this should
not matter.

cheers
tobi

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list