Daniel-Constantin Mierla writes:
I assume many times the changes will be somewhere down
the tree, since
the first part of the number is usually the same (e.g., country code and
operator prefix). To update the tree at runtime, while there are reads
on it, there must be used a lock to be safe an consistent. If you do lot
of writes and very often, then you keep the tree structure locked a lot,
slowing the search.
daniel,
could the lock be from the node that requires modification downwards,
which would leave all other branches unlocked?
Can you estimate the number of writes and how often
they would be on a
daily basis? There might be other solutions to look at, if writes are
very often.
i was thinking that perhaps mtree would be used to store numbers that
are ported to other operators instead of the current carrier route pdb
server, where the whole mmap file needs to be reloaded. in that
application i would imagine a few hundred updates per hour, but many of
them would only affect the value associated with the node, not the
structure of the three.
-- juha