jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: writing a new DocumentStore implementation
Date Mon, 02 Dec 2013 14:42:38 GMT
Hi,

> a) package structure: right now the existing implementations live in
> org.apache.jackrabbit.oak.plugins.mongomk -- shouldn't we use separate
> packages?

the package name is inspired by the primary backend implementation, which
is MongoDB. it may make sense to rename it to something more generic, since
the majority of code is agnostic of the underlying storage.

the MongoDocumentStore is just one possible implementation of DocumentStore.

> b) it appears to some code in MemoryDocumentStore might be of generic
> use, such as the static methods checkConditions(...) and
> applyChanges(...). Can we move those into a utility class, or closer to
> UpdateOp?

either we move it or you simply use the existing methods on MemoryDocumentStore.
I think it's fine to use the methods in MemoryDocumentStore, but feel free
to move them.

> Contract:
> 
> c) Will an UpdateOp *ever* attempt to change "_id"? If this is not the
> case, what does a node rename operation do internally? (I'm asking
> because I have test failures when my repo isn't fresh, so apparently
> somehow nodes still exist that should have gone...).

an _id never changes. internally a move operation is translated into
a copy and delete operation on the documents.

regards
 marcel

Mime
View raw message