Re: Updating keys of secondary databases -
08-01-2006
, 03:23 AM
Hi Jose,
Berkeley DB supports updates on secondary if you are using a DB handle.
Since your update on primary, creates a new registry in the secondary
database, is very probable that you didn't associated the primary
handle with the appropiate secondary one.
Documentation regarding secondary indices can be found here:
http://www.sleepycat.com/docs/ref/am/second.html
I think that you are interested in this paragraph: "Note that although
Berkeley DB guarantees that updates made using any DB handle with an
associated secondary will be reflected in the that secondary,
associating each primary handle with all the appropriate secondaries is
the responsibility of the application and is not enforced by Berkeley
DB. It is generally unsafe, but not forbidden by Berkeley DB, to modify
a database that has secondary indices without having those indices open
and associated. Similarly, it is generally unsafe, but not forbidden,
to modify a secondary index directly. Applications that violate these
rules face the possibility of outdated or incorrect results if the
secondary indices are later used."
If the problem persist, please provide me at least the order of methods
that you are calling, or the source code for this update, and I'll look
over. Also, please tell me what Berkeley DB product are you using (
http://www.sleepycat.com/docs/ref/intro/products.html ) and on which
platform.
Regards,
Bogdan Coman, Oracle |