Home Help Center

Freeze and BDB Environments / Replication

jesse@mind.net[email protected] Member Jesse WilliamsonOrganization: Musician's Friend, Inc.Project: musiciansfriend.com
Hello,

When I try to pass a custom BerkeleyDB environment (with or without BDB replication enabled) to my Freeze (Ice 3.2.1) server, my program begins to experience failures in code that works as expected when the default environment is used.

Current flags:
u_int32_t dbenv_mode = S_IRUSR | S_IWUSR;
u_int32_t dbenv_flags = DB_CREATE|DB_RECOVER|DB_THREAD|DB_INIT_MPOOL|DB_INIT_TXN|DB_INIT_LOG|DB_INIT_LOCK|DB_INIT_REP;

The application starts with DbEnv(0), configures replication, opens the environment, starts replication, and then passes the environment to Freeze::createConnection().

I get either a segfault from calling find() on a freeze2cpp generated map<>, with replication disabled, or a Db::open() failure from SharedDb.cpp if replication is enabled. If I don't try to install a custom environment, the server works normally.

My guess is that I've got incompatible BDB flags, but I just can't seem to hit on the right combination. I have no DB_CONFIG in the environment directory.

Anything extra special I need to do to get Freeze to work with BerkeleyDB
replication? Is there something different between Ice-3.2.1 and the current version? Am I just trying to do this the wrong way?

I'm happy to post the relevant code and whatnot, if this is not something with a well-known solution and further information is helpful..

Thanks very much! I appreciate any help.

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Jesse,

    We do not support Berkeley DB replication with Freeze, and we have no plan to add support for this DB feature.

    Cheers,
    Bernard
Sign In or Register to comment.