[ARVADOS] created: 1.3.0-3173-gf317fc0d8

Git user git at public.arvados.org
Wed Sep 16 20:34:05 UTC 2020


        at  f317fc0d8e77ce950b6a650149600b0c8f6c38f3 (commit)


commit f317fc0d8e77ce950b6a650149600b0c8f6c38f3
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Wed Sep 16 14:02:33 2020 -0400

    16842: Truncate nanoseconds from timestamps in index response.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/services/keepstore/s3_volume.go b/services/keepstore/s3_volume.go
index 235d369b5..07bb033c9 100644
--- a/services/keepstore/s3_volume.go
+++ b/services/keepstore/s3_volume.go
@@ -586,7 +586,10 @@ func (v *S3Volume) IndexTo(prefix string, writer io.Writer) error {
 		if err != nil {
 			return err
 		}
-		fmt.Fprintf(writer, "%s+%d %d\n", data.Key, data.Size, t.UnixNano())
+		// We truncate sub-second precision here. Otherwise
+		// timestamps will never match the RFC1123-formatted
+		// Last-Modified values parsed by Mtime().
+		fmt.Fprintf(writer, "%s+%d %d\n", data.Key, data.Size, t.Unix()*1000000000)
 	}
 	return dataL.Error()
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list