[ARVADOS] updated: 1.2.0-284-gb8035155b

Git user git at public.curoverse.com
Tue Nov 6 11:22:00 EST 2018


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

       via  b8035155b7db4b7ed11babde71e7d82c3d09fa6d (commit)
      from  4ed6626cfba06e924f77dc54e1fe704eff1d113c (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 b8035155b7db4b7ed11babde71e7d82c3d09fa6d
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Nov 6 11:13:05 2018 -0500

    14406: Only call LocalLocator() once per block per stream.
    
    Avoid excess calls when many files are packed in a single block.
    
    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 2b9b7b30c..e5c0b32ac 100644
--- a/sdk/go/arvados/fs_collection.go
+++ b/sdk/go/arvados/fs_collection.go
@@ -586,6 +586,7 @@ func (dn *dirnode) sync(names []string) error {
 		return nil
 	}
 
+	localLocator := map[string]string{}
 	for _, name := range names {
 		fn, ok := dn.inodes[name].(*filenode)
 		if !ok {
@@ -594,9 +595,14 @@ func (dn *dirnode) sync(names []string) error {
 		for idx, seg := range fn.segments {
 			switch seg := seg.(type) {
 			case storedSegment:
-				loc, err := dn.fs.LocalLocator(seg.locator)
-				if err != nil {
-					return err
+				loc, ok := localLocator[seg.locator]
+				if !ok {
+					var err error
+					loc, err = dn.fs.LocalLocator(seg.locator)
+					if err != nil {
+						return err
+					}
+					localLocator[seg.locator] = loc
 				}
 				seg.locator = loc
 				fn.segments[idx] = seg

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list