locationtech/geogig — pull request #2 by groldan (2014-12-10 22:48:22+00:00)
Title: Remove StagingDatabase, send all objects to ObjectDatabase.

This is a storage design change. StagingDatabase dissappears, and
only its conflict related methods remain in the form of a new
ConflictsDatabase interface.

The benefits are simplicity and speed, as there's no need to move/copy
objects between the two databases, which is a huge performance penalty
in cases like commit, checkout, etc.
The risk is to have dangling (non reachable from any head) objects
in the repository. Given the importance of dealing with large datasets
in a more efficient way, we're accepting this taking into acount that
in the future some kind of garbage collection has to be implemented.

For simplicity sake, this ConflictsDatabase
is not a first class, independently configurable object. Instead,
concrete instances are to be provided by each repository's ObjectDatabase.

The default one as previously used by JEStagingDatabase has been made part
of the core module under the storage.fs package, named FileConflictsDatabase.

Client code access it through Context.conflictsDatabase(), which replaces
Context.stagingDatabase() for conflict handling.