7121: Clarify expected behavior of Compare() in Volume interface.
authorTom Clegg <tom@curoverse.com>
Tue, 8 Sep 2015 15:22:50 +0000 (11:22 -0400)
committerTom Clegg <tom@curoverse.com>
Tue, 8 Sep 2015 15:22:50 +0000 (11:22 -0400)
services/keepstore/volume.go

index d3616d0812d4081bf3cdd49be3082759661c4ec4..d17af446a6b2674f9e86330ace0fea457d023e2a 100644 (file)
@@ -15,10 +15,11 @@ type Volume interface {
        // put the returned slice back into the buffer pool when it's
        // finished with it.
        Get(loc string) ([]byte, error)
-       // Confirm Get() would return buf. If so, return nil. If not,
-       // return CollisionError or DiskHashError (depending on
-       // whether the data on disk matches the expected hash), or
-       // whatever error was encountered opening/reading the file.
+       // Confirm Get() would return a buffer with exactly the same
+       // content as buf. If so, return nil. If not, return
+       // CollisionError or DiskHashError (depending on whether the
+       // data on disk matches the expected hash), or whatever error
+       // was encountered opening/reading the file.
        Compare(loc string, data []byte) error
        Put(loc string, data []byte) error
        Touch(loc string) error