[ARVADOS] updated: 1.2.0-115-gd5aeb0c9a

Git user git at public.curoverse.com
Tue Sep 25 17:00:29 EDT 2018


Summary of changes:
 sdk/go/arvados/fs_collection.go | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

       via  d5aeb0c9a768004dfb806678573f11b5048e26f0 (commit)
      from  3596aff0954f405b06799814585d834502d0d76a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d5aeb0c9a768004dfb806678573f11b5048e26f0
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Sep 25 16:57:55 2018 -0400

    10181: Fix overloaded Size method.
    
    The method recently added to *dirnode is now TreeSize, rather than
    overloading the non-recursive Size method of the inode interface.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/go/arvados/fs_collection.go b/sdk/go/arvados/fs_collection.go
index 1fe4d8f56..f6afadba5 100644
--- a/sdk/go/arvados/fs_collection.go
+++ b/sdk/go/arvados/fs_collection.go
@@ -32,6 +32,7 @@ type CollectionFileSystem interface {
 	// prepended to all paths in the returned manifest.
 	MarshalManifest(prefix string) (string, error)
 
+	// Total data bytes in all files.
 	Size() int64
 }
 
@@ -142,7 +143,7 @@ func (fs *collectionFileSystem) MarshalManifest(prefix string) (string, error) {
 }
 
 func (fs *collectionFileSystem) Size() int64 {
-	return fs.fileSystem.root.(*dirnode).Size()
+	return fs.fileSystem.root.(*dirnode).TreeSize()
 }
 
 // filenodePtr is an offset into a file that is (usually) efficient to
@@ -877,13 +878,15 @@ func (dn *dirnode) createFileAndParents(path string) (fn *filenode, err error) {
 	return
 }
 
-func (dn *dirnode) Size() (bytes int64) {
+func (dn *dirnode) TreeSize() (bytes int64) {
 	dn.RLock()
 	defer dn.RUnlock()
 	for _, i := range dn.inodes {
 		switch i := i.(type) {
-		case *filenode, *dirnode:
+		case *filenode:
 			bytes += i.Size()
+		case *dirnode:
+			bytes += i.TreeSize()
 		}
 	}
 	return

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list