From: Tom Clegg Date: Tue, 8 Sep 2015 15:22:50 +0000 (-0400) Subject: 7121: Clarify expected behavior of Compare() in Volume interface. X-Git-Tag: 1.1.0~1363^2~4 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/5f4b7e74af4b85f290ffe396db84a5cab6af08a1 7121: Clarify expected behavior of Compare() in Volume interface. --- diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go index d3616d0812..d17af446a6 100644 --- a/services/keepstore/volume.go +++ b/services/keepstore/volume.go @@ -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