Added command line options to ignore duplicate quad in add or missing quad in delete

This commit is contained in:
l.albertalli 2015-02-06 17:49:16 -08:00
parent 3c64b52e39
commit ce1cce5a01
5 changed files with 50 additions and 8 deletions

View file

@ -43,6 +43,7 @@ var (
}
hashSize = sha1.Size
localFillPercent = 0.7
)
type Token struct {
@ -208,6 +209,12 @@ func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta) error {
for _, d := range deltas {
err := qs.buildQuadWrite(tx, d.Quad, d.ID.Int(), d.Action == graph.Add)
if err != nil {
if err == graph.ErrQuadExists && *graph.NoErrorDup{
continue
}
if err == graph.ErrQuadNotExist && *graph.NoErrorDel{
continue
}
return err
}
delta := int64(1)