Mongo log works (and bug fixed)

This commit is contained in:
Barak Michener 2014-08-10 21:05:39 -04:00
parent 3770190db5
commit 48711af1d9
3 changed files with 45 additions and 5 deletions

View file

@ -33,8 +33,9 @@ type Single struct {
}
func NewSingleReplication(ts graph.TripleStore, opts graph.Options) (graph.QuadWriter, error) {
rep := &Single{nextID: ts.Horizon(), ts: ts}
if rep.nextID <= 0 {
horizon := ts.Horizon()
rep := &Single{nextID: horizon + 1, ts: ts}
if horizon <= 0 {
rep.nextID = 1
}
return rep, nil