public synchronized void merge() {
DBObject id = new BasicDBObject("_id", name);
DBObject state = journals.findOne(id, null, primaryPreferred());
checkState(state != null);
if (state.containsField("parent")) {
RecordId base = RecordId.fromString(state.get("base").toString());
RecordId head = RecordId.fromString(state.get("head").toString());
NodeState before = new SegmentNodeState(store, base);
NodeState after = new SegmentNodeState(store, head);