[PATCH] Add replicated database model to ctdb

Amitay Isaacs amitay at gmail.com
Wed Jun 28 05:58:19 UTC 2017


On Wed, Jun 28, 2017 at 3:38 PM, Ralph Böhme <slow at samba.org> wrote:

> On Tue, Jun 27, 2017 at 04:41:59PM +1000, Amitay Isaacs via
> samba-technical wrote:
> > Hi,
> >
> > CTDB has two database models:
> >
> > 1. Persistent databases - replicated and permanent
> > 2. Volatile database - distributed and temporary
> >
> > This patch set adds a new database model
> >
> > 3. Replicated database - replicated and temporary
> >
> > The main purpose of this database model is store ctdb state information
> > which requires to be replicated across the cluster.  Currently different
> > types of state information is replicated using different methods.  With
> > this database model, we can get rid of various ad-hoc methods and use a
> > consistent API for cluster-wide state replication.
>
> can you provide a brief description how this new model works? Sorry,
> missed your
> talk... ;)
>
>
Replicated database is primarily a temporary database (so attached with
TDB_CLEAR_IF_FIRST tdb flag).
- it's valid for the lifetime of ctdb.
- It's backed by a file so multiple processes can attach to it just like a
volatile database.
- It is manipulated using the transaction api as we do for persistent
databases for replication.

The other thing to note is that since it's opened with TDB_NOSYNC, it does
not suffer from the same performance problem as persistent databases (due
to fsync/fdatasync).

Amitay.


More information about the samba-technical mailing list