Merge branch '5523-stats-error' closes #5523
[arvados.git] / services / keepstore / volume.go
index 0f9fcffe52327435540df00692d0c587dd2981b6..1b5294952820b5cb2f0be2d53c37eb84f2cefed5 100644 (file)
@@ -5,6 +5,7 @@
 package main
 
 import (
+       "io"
        "sync/atomic"
        "time"
 )
@@ -14,7 +15,7 @@ type Volume interface {
        Put(loc string, block []byte) error
        Touch(loc string) error
        Mtime(loc string) (time.Time, error)
-       Index(prefix string) string
+       IndexTo(prefix string, writer io.Writer) error
        Delete(loc string) error
        Status() *VolumeStatus
        String() string
@@ -69,7 +70,7 @@ func (vm *RRVolumeManager) NextWritable() Volume {
                return nil
        }
        i := atomic.AddUint32(&vm.counter, 1)
-       return vm.writables[i % uint32(len(vm.writables))]
+       return vm.writables[i%uint32(len(vm.writables))]
 }
 
 func (vm *RRVolumeManager) Close() {