thanks for your comments,  just to confirm if my understanding is right, in
order to remove any mention of LevelDBStore from FileStore or
MonitorDBStore, these codes that metioned LevelDBStore in FileStore and
MonitiorDBStore will be abstracted as interfaces of KeyValueDB. Is
KeyValueDB::create() is something like ObjectStore::create()?


2014-03-03 13:47 GMT+08:00 Sage Weil <notifications@github.com>:

> In src/os/FileStore.cc:
>
> >
> > +      dout(1) << "Initializing leveldb successful " << dendl;
> > +      if (g_conf->osd_compact_leveldb_on_mount) {
> > +        derr << "Compacting store..." << dendl;
> > +        omap_store->compact();
> > +        derr << "...finished compacting store" << dendl;
> > +      }
> > +    #endif
>
> Yeah, I think ideally this series would be prefixed by a patch that
> removed any mention of LevelDBStore from FileStore or MonitorDBStore and
> made the factory method like KeyValueDB::create(string type, ...). But the
> leveldb options make this tricky, since they would need to be abstracted as
> part of the KeyValueDB interface for it to be fully generic.
>
> Interestingly, rocks and leveldb have nearly identical interfaces. The
> next backend we add (probably libkinetic) will not. It might be fine to
> wait... but it would still be nice to avoid this #ifdef stuff and backend
> awareness in the callers.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/ceph/ceph/pull/1346/files#r10201241>
> .
>