Commit f462ad6d authored by Adin Schmahmann's avatar Adin Schmahmann

update datastore interface to support asynchronous writes to datastores. add...

update datastore interface to support asynchronous writes to datastores. add datastore Sync during pinner.Flush()
parent 05f55f1b
...@@ -579,6 +579,9 @@ func (p *pinner) Flush(ctx context.Context) error { ...@@ -579,6 +579,9 @@ func (p *pinner) Flush(ctx context.Context) error {
if err := p.dstore.Put(pinDatastoreKey, k.Bytes()); err != nil { if err := p.dstore.Put(pinDatastoreKey, k.Bytes()); err != nil {
return fmt.Errorf("cannot store pin state: %v", err) return fmt.Errorf("cannot store pin state: %v", err)
} }
if err := p.dstore.Sync(pinDatastoreKey); err != nil {
return fmt.Errorf("cannot sync pin state: %v", err)
}
p.internalPin = internalset p.internalPin = internalset
return nil return nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment